Creating C sources

The input parameters are passed to C functions using the stack. They can be retrieved by the pop functions — for instance, popint.

This file is located in the %LYCIA_DIR\include directory. This directory is referenced by -I flag when a C source is compiled.

Now suppose we want the following C function to be callable from our 4GL program:

/* my_c_src.c */

#include "fglsys.h"

int my_c_func(int argc) {

  int n;

  popint(&n);

  pushint(n/2);

  pushint(n*2);

  return(2);

}

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.