A frequently-occurring idiom in C code is the "out parameter". If a C function returns more than one value, the caller passes pointers of the correct type, and the C function writes its return values to those locations.
with-out-parameters ( c-types quot -- values... )
The idiom is commonly used for passing back an error message if the function calls fails. For example, if a function is declared in the following way:
FUNCTION: int do_frob ( int arg1, char** errptr )
Then it could return 1 on error and 0 otherwise. A correct way to call it would be:
1234 { c-string } [ do_frob ] with-out-parameters
which would put the function's return value and error string on the stack.
This documentation was generated offline from a
load-all
image. If you want, you can also
browse the documentation from within the UI developer tools . See
the Factor website
for more information.
Factor 0.101 x86.64 (2285, heads/master-efda6dad2f, Nov 20 2024 16:02:37)