297 B3 selects the basic format thus: 00 General format (G format) 01 Exponent format (E format) 02 Fixed format (F format) In G format numbers that are integers will be printed as integers. Numbers in the range 0.1 to 1 will be printed as 0.1 etc. Numbers less than 0.1 will be printed in exponent format. Exponent format will always print numbers in scientific notation; 100 becomes 1E2, 1000 becomes 1E3 and 1200 becomes 1.2E3 Fixed format prints numbers with a fixed number of decimal places. If the number cannot be fitted into the selected field width it reverts to G format. The decimal points are aligned vertically which is ideal for scientific and accounting programs.
B2 controls the total number of digits printed in the selected format. If B2 is too large or too small for the MODE selected then B2 is taken as 10. The number is rounded to fit in the B2 digit field. In G format B2 gives the maximum number of digits that can be printed before reverting to E format. Range 1-9. In E format B2 specifies the total number of digits to be printed before and after the decimal point – but not counting the digits after the E. Another way of looking at it is to say that (B2-1) digits will follow the decimal point. In E format three characters or spaces always follow the final E. Range of B2 in E format is 1- 10.
In F format B2 specifies the number of digits to follow the decimal point. Range 0-10. B1 sets the overall print field width and may have any value in the range 0 to 255 which in hexadecimal is &00 to &FF. For example accounting purposes would often require fixed format two decimal places and ten character field width. The four bytes of @ are built up thus: @%=& 00 00 00 00 B4 - zero 00 B3 - fixed format 02 B2 - two decimal places 02 B1 - character field 0A So @%=&0002020A , the & indicating that the number is in hexadecimal. You can, of course, omit the leading zeros.