FUNCTION-ALIAS:
Factor handbook » C library interface » Calling C from Factor

Prev:FUNCTION:
Next:alien-invoke ( args... return library function parameters varargs? -- return... )


Vocabulary
alien.syntax

Syntax
FUNCTION-ALIAS: factor-name return c_name ( parameters ) ;


Inputs
None

Outputs
None

Word description
Defines a new word factor-name which calls the C library function named c_name in the logical library given by the most recent LIBRARY: declaration.

The new word must be compiled before being executed.

Notes
Note that the parentheses and commas are only syntax sugar and can be omitted. They serve no purpose other than to make the declaration easier to read.

See also
FUNCTION:

Definition