Write a ISO(ANS) confroming program in decimal BASIC

Decimal BASIC has been extended from JIS(ISO), so programs that run on decimal BASIC do not necessarily conform ISO(ANS).
Below are some points to keep in mind in order to comply with ISO.

1.Test by setting all items marked with (ISO) to the ISO side in the Options-Compatibility menu.
  This allows you to detect DIM statements that contain variables in the subscript range.
2.In a PRINT USING statement, the format for items that may be negative must always include a negative or positive sign.
3.Keep the array dimensions within three dimensions. Also, it does not generate arrays of size 0.
4.Make the program work correctly even if the initial value of the variable is not 0.
  Write a program that works correctly even if the precision of a numeric variable is 10 digits. However, it can be assumed that the numerical formula takes accurate values up to 11 digits.
  Also, note that when you specify an OPTION ARITHMETIC NATIVE, it does not necessarily mean that it is a binary operation (it may be a decimal operation).
5. Do not use LOCAL statements in internal procedure definitions. See Elimination of LOCAL statements
6.Replace SWAP statements with subprograms.
  When using DRAW GRID,DRAW AXES,DRAW CIRCLE,DRAW DISK,
  For each program unit that uses it, write a DECLARE EXTERNAL PICTUTRE declaration, and then write the corresponding external picture definition below the END line.
  Examples of picture definitions required to match ISO are included in AXES.LIB, Axes2.lib, GRID.LIB, Grid2.lib, Circle.LIB in the library folder.
   However, the picture definitions contained in these files do not fully meet the ISO compatibility and need to be corrected (by adding line numbers, deleting Japanese annotations, etc.).
7. ANSI standard does not prescribe any correspondence between color numbers and actual colors.
  If you want to identify a color, use the SET COLOR MIX statement to specify the color corresponding to the color indicator.
Example:

  SET COLOR MIX(0) 1,1,1    ! Make color number 0 (background color) white
  SET COLOR MIX(1) 0,0,0    ! Make the first color black
  SET COLOR MIX(2) 0,0,1    ! Turn the second color blue

Furthermore, ANSI standard does not specify a lower limit for the number of colors that can be used.
Run ASK MAX COLOR n to get the maximum color number value in variable n and use only color numbers below that.
  Note that an example of an external definition required when specifying a color name can be found in SET_COLOR.LIB in the library folder. Correct and use as appropriate.
8.Do not write any seed in the RANDOMIZE statement. ( There is no alternative other than providing your own random number)
9.Do not use characters other than ASCII.
10.Do not use statements or functions that are marked as "original extensions" in the help, such as File Gettname, Mouse Pool, or Set Draw Mode.FILE GETNAME,MOUSE POLL,SET DRAW MODE .
11.Add line numbers to all lines.


Back