File:  [Coherent Logic Development] / freem / examples / libfreem / freem_function / freem_function.c
Revision 1.2: download - view: text, annotated - select for diffs
Sun Mar 9 15:20:18 2025 UTC (4 weeks, 5 days ago) by snw
Branches: MAIN
CVS tags: v0-63-1-rc1, v0-63-0-rc1, v0-63-0, v0-62-3, v0-62-2, v0-62-1, v0-62-0, HEAD
Begin formatting overhaul and REUSE compliance

/*
* @Author: Serena Willis
* @Date:   2020-04-03 15:59:49
* @Last Modified by:   Serena Willis
* @Last Modified time: 2020-04-03 16:23:44
*/


#include <stdio.h>
#include <string.h>
#include <freem.h>

int main(int argc, char **argv, char **envp)
{
    freem_ent_t ent;
    
    /* equivalent to $$ADDTWO^%ZFRMSAMP(2,2) */

    sprintf (ent.name, "ADDTWO^%%ZFRMSAMP");
    sprintf (ent.arguments[0], "2");
    sprintf (ent.arguments[1], "2");

    ent.argument_count = 2;

    freem_init ("USER");
    freem_function (&ent);

    printf ("Return value from $$%s(2,2) is '%s'\n", ent.name, ent.value);

}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>