Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

DEFCE

Description

The DEFCE statement should be used, rather than the DEFC statement, for calling External C programs, which are pure ā€˜Cā€™ code and do not use the jBASE library macros and functions.

For C functions that do not require jBASE functions, use the DEFCE statement, however the passing arguments can only be of type INT, FLOAT and STRING. An example of this can be as:

DEFCE INT CFUNC(INT, FLOAT, VAR)
Var1 = CFUNC(A, 45, B)


It is also possible to call standard UNIX functions directly by declaring them with the DEFC statement according to their parameter requirements. They can be called directly provided they return type INT or FLOAT/DOUBLE, or that the return type may be ignored. An example is as:

DEFCE INT getpid()
CRT "Process id =":getpid()


Go back to jBASE BASIC.

Was this article helpful?