FutureBasic Logo

<<    Index    >> FutureBasic 5

BeginCCode   statement



Syntax:
BeginCCode
 C statements
EndC


Description:
Marks the beginning of a block of C language statements. The block must be terminated with the EndC statement. The C statements are copied untranslated into the C source code, then compiled by the C compiler. BeginCCode is intended to replace and has advantages over the old #if def _PASSTHROUGH / #endif syntax. The #if def _PASSTHROUGH / #endif syntax continues to be available.

Unlike #if def _PASSTHROUGH / #endif, BeginCCode does not interfere with editor indentation and C keywords within the block are not highlighted.

#if def _PASSTHROUGH
// FBtoC sees this; FutureBasic does not
// FBtoC passes everything, except comments, untranslated to the compiler
// passed C code goes in current function or main()
#endif

could be written as:

BeginCCode
// FBtoC passes everything, except comments, untranslated to the compiler
// passed C code goes in current function or main()
EndC

See Also:
BeginCFunction; BeginCDeclaration; EndC; #if