A string to be formatted and embedded
・Control the value formatting method by adding the following type specification or auxiliary specification after %.
%S | Outputs the contents of a string variable |
%D | Decimal Int Output |
%X | Hexadecimal Int Output |
%F | Real Output |
%B | Binary Int Output |
%% | Output the Character % |
Format the output by specifying the following auxiliary specification after %
・Number of digits specification: Specify the number of digits (%8D,%4X)
・Specify the number of decimal places: The total number of digits, the number of digits in the decimal part (%8.2F)
・Blank padding: Specify a space character + number of digits (% 4D → " 0")
・Zero padding: Specify 0 + number of digits (%08D → "00000000")
・Left alignment: Specify -symbol + number of digits (%-8D)
・+Sign display: Specify +symbol + number of digits (%+8D)
・Specify the value to be formatted and converted into a string as many arguments as the % specified in the format string (excluding %%).
・An error occurs if the % specification does not match with the type expected and the argument type.
Generated string
S$=FORMAT$("%06D",A)