VID Script Format Strings

Some VID script functions make use of fprmat strings.
These gunctions include, print(), syslog() and com().
A format string parameter contains zero or more of the following conversion specifications,
parameters folowing the format string are the data for the conversions to act open,
each conversion in the format string must have a matching parameter.

% A conversion specification is introduced with this required character.
flags followed by zero or more flags
width followed by an optional width field
precision followed by an optional precision field
conversion ending in a required conversion type character
e.g.
print("Value = %04X %6d ", val, val);

Will print the variable "val" as a Hexadecimal number within a field width of four charactes padded with leading zeroes if required, followed by the same number represented as a decimal number in a 6 character field, padded, if required, by spaces.

Flags
These are used to change the default behavior of the conversion.
-left justify the field
0pad number conversions with leading zeros, ignore if a - is present
spacepad number conversions with leading space, ignore if a - is present

Field Width
The number of characters wide a field is. Spaces (or zeroes) are used to pad the extra characters if a value is not as wide as the given width. If the value is larger than this number, the field will expand to fit the number.

Precision
The minimum number of digits to appear for integer types or the number of digits to apear after a floating point number or the maximum number of characters to print from a string. This takes the form of a decimal point followed by an optional number. If no number is given the precision defaults to 0.

Conversions
dprint int to signed decimal
iprint int to signed decimal
oprint unsigned int to unsigned octal
uprint unsigned int to decimal
xprint unsigned int to hexidecimal (lowercase)
Xprint unsigned int to hexidecimal (uppercase)
fprint double to decimal
eprint double to scientific notation (lowercase 'e')
Eprint double to scientific notation (uppercase 'E')
sprint string pointer to string
cprint int (ASCII value) as a single character
%print a single % in the output by escaping as %%