Effects of Decimal BASIC Compatibility Options

Interpretation of a format string

When "No preceding space generated" is checked on the "Formatting for #" compatibility option menu, Decimal BASIC ignores the regulation that "leading spaces (shall be generated) when a number-sign is used as a digit-place" in 10.4.4.3. After that, "-" is added to the left if the number is negative, and finally, it shall be filled with spaces on the left as the standard demands.
Thus, Formatting string composed with only #'s can be used for outputting a negative number if there is a room for a negative sign

When "Preceding spaces generated (ISO)" is checked, Decimal BASIC works as the standard demands.
For example,

PRINT USING "###":-1

generates " 1" on the state of 1.4.4.2, its length shall exceeds the length of the format items when it is added with a negative sign, so that it shall raise a non-fatal exception.

Note.
Outputs for positive numbers are the same. The only difference is that ISO compatible raises a fatal exception when a negative number is to be outputted.

Parameters of a DEF-statement

Full BASIC passes parameters by value on function definitions, but Decimal BASIC passes parameters of DEF-statements by reference if possible for improvement on speed. Thus some tricky program may carry some incompatibility with Full BASIC standard. If you want to avoid that risk, check "always passed by values (ISO)".
For example, the following program differs depending on this option.

10 FUNCTION h(x)
20    LET a=2
30    LET h=a*x
40 END FUNCTION
50 DEF f(x)=h(x)*x
60 LET a=1
70 PRINT f(a)
80 END

In future, this option shall be removed. You should not write a program that depends on pass-by-reference behavior of a DEF-statement.


Back