FBtoC Preferences Settings
The Settings dialog is self-documenting by virtue of the titles, help tags, and grouping of the controls:
The FB compiler reads a little-known file UserFloatPrefs (typically in User Libraries) to determine four settings. FBtoC does not attempt to read UserFloatPrefs. Of the four settings, only _RoundUpFloat2Long is supported in FBtoC.
|_NumberLeadingSpace||Not supported||always ON|
|_FBAllowNAN||Not supported||always ON|
|_RoundUpFloat2Long||Supported||initially OFF |
To force FBtoC to round conversions from float to integer, place this statement near the top of your code, before any calculations:
override _RoundUpFloat2Long = _true // float->int conversions, from here on, are rounded to nearest
FB takes no notice of this statement, because it has already determined the setting by reading UserFloatPrefs. Once rounding is enabled in a project, it cannot be turned off by further overriding _RoundUpFloat2Long; this behaviour matches FB.
Making a console application
To build a text-only console app, similar to FB's Console, place this at the start of your code:
In console mode, print commands are directed to a scrolling text window.