Picture Codes |
Picture codes are used to choose the formatting for numerical values. They take the form #### for integers, or ####, ####.##, or *.## for reals. A complex number will display as (real part,complex part) where each part is formatted according to the picture.
A code with no decimal point causes the number to be printed right-justified in a field whose width is the number of # signs. A code with a decimal point produces a number the width of the total string, with the decimal point in the indicated location. If you use * left of the decimal point, it uses as many places as needed to show the number and no more.
A * by itself requests the default formatting, which, for a DISPLAY instruction, is generally fourteen total places, typically with five digits right of the decimal. (By default, graphics instructions format the axis labels to align decimals while using as few digits as possible).
On all instructions except DISPLAY, the picture code will be in quotes, as it will be part of an option:
graph(picture="*.##")
For DISPLAY the picture is just another field and isn't quoted (in quotes, it would be a literal string):
display ##.## %beta
As examples, if the value is 123.4567,
|
Picture code |
Will format as |
|
#### |
123 |
|
*.## |
123.46 (rounding the fractional part) |
|
######.### |
123.457 |
|
* |
123.45670 |
Copyright © 2025 Thomas A. Doan