The PRINTF command is an alternative to the PRINT command that allows format control in the spirit of the C function printf().
PRINTF format_specifier, arg, arg, ...
The format_specifier can be almost any legal printf() format. The argument expressions will be evaluated and the result output according to the format_specifier.
The format_specifier should consist of plain text interspersed with argument formats. The argument formats consist of a percent sign '%' followed by an argument type which may be one of 'd' for integer, 's' for string and 'f' for floating point. In actual fact almost the entire printf() format syntax is supported, but will not be described here.
Example:
PRINTF "Hello %s, how is your day?\n", myname "Hello Frank, how is your day?" PRINTF "File %s is %d x %d with %d channels.\n", file, dbsz(1), dbsz(2), dbnc "File irvine.pix is 512 x 512 with 11 channels."
Note that a newline specifier ("\n") must be given in the format in order to force the cursor onto a new line. This is different than the PRINT statement where a dollar sign ("$") must be appended to the PRINT statement to suppress the default new line.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.