Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- | Character | Description | Full form | Modifier | | | |
- |-----------|-------------|-----------|----------|---|---|---|
- | None | `:` | `@` | `:@` | | | |
- | ~ | Prints the literal ~ character. | `~_repetitions_**~**`. | Prints `_repetitions_` times the `~` character. | Invalid | | |
- | c, C | Prints a single character. | `~**c**`. | Prints the format argument character without prefix. | Spells out non-printing characters. | Prepends the readable `#\` prefix. | Spells out non-printing characters and mentions shift keys. |
- | % | Prints an unconditional newline. | `~_repetitions_**%**`. | Prints `_repetitions_` line breaks. | Invalid | | |
- | & | Prints a conditional newline, or fresh-line. | `~_repetitions_**&**`. | If the destination is not at the beginning of a fresh line, prints `_repetitions_` line breaks; otherwise, prints `_repetitions_` - 1 line breaks. | Invalid | | |
- | \| | Prints a page separator. | `~_repetitions_**\|**`. | Prints `_repetitions_` times a page separator. | Invalid | | |
- | r, R | Either prints the number in the specified base (radix) or spells it out. | `~_radix_,_minColumns_,_padChar_,_commaChar_,_commaInterval_**R**`. | Prints the argument as an English number. | Spells the argument in English ordinal numbers. | Prints the argument in Roman numerals using the usual Roman format (e.g., 4 = IV). | Prints the argument in Roman numerals using the old Roman format (e.g., 4 = IIII). |
- | d, D | Prints the argument in decimal radix (base = 10). | `~_minColumns_,_padChar_,_commaChar_,_commaInterval_**d**`. | Prints as decimal number without `+` (plus) sign or group separator. | Uses commas as group separator. | Prepends the sign. | Prepends the sign and uses commas as group separator. |
- | b, B | Prints the argument in binary radix (base = 2). | `~_minColumns_,_padChar_,_commaChar_,_commaInterval_**b**`. | Prints as binary number without `+` (plus) sign or group separator. | Uses commas as group separator. | Prepends the sign. | Prepends the sign and uses commas as group separator. |
- | o, O | Prints the argument in octal radix (base = 8). | `~_minColumns_,_padChar_,_commaChar_,_commaInterval_**o**`. | Prints as octal number without `+` (plus) sign or group separator. | Uses commas as group separator. | Prepends the sign. | Prepends the sign and uses commas as group separator. |
- | x, X | Prints the argument in hexadecimal radix (base = 16). | `~_minColumns_,_padChar_,_commaChar_,_commaInterval_**x**`. | Prints as hexadecimal number without `+` (plus) sign or group separator. | Uses commas as group separator. | Prepends the sign. | Prepends the sign and uses commas as group separator. |
- | f, F | Prints the argument as a float in fixed-point notation. | `~_width_,_numDecimalPlaces_,_scaleFactor_,_overflowChar_,_padChar_**f**`. | Prints as fixed-point without `+` (plus) sign. | Invalid | Prepends the sign. | Invalid |
- | e, E | Prints the argument as a float in exponential notation. | `~_width_,_numDecimalPlaces_,_numDigits_,_scaleFactor_,_overflowChar_,_padChar_,_exponentChar_**e**`. | Prints as exponential without `+` (plus) sign. | Invalid | Prepends the sign. | Invalid |
- | g, G | Prints the argument either as a float in fixed-point or exponential notation, choosing automatically. | `~_width_,_numDecimalPlaces_,_numDigits_,_scaleFactor_,_overflowChar_,_padChar_,_exponentChar_**g**`. | Prints as fixed-point or exponential without `+` (plus) sign. | Invalid | Prepends the sign. | Invalid |
- | $ | Prints the argument according to monetary conventions. | `~_width_,_numDigits_,_minWholeDigits_,_minTotalWidth_,_padChar_**$**`. | Prints in monetary conventions without `+` (plus) sign or padding. | Prepends the sign before padding characters. | Prepends the sign. | Invalid |
- | a, A | Prints the argument in a human-friendly manner. | `~_minColumns_,_colInc_,_minPad_,_padChar_**a**`. | Prints human-friendly output without justification. | Prints `NIL` as empty list `()` instead of `NIL`. | Pads on the left instead of the right side. | Pads on the left and prints `NIL` as `()`. |
- | s, S | Prints the argument in a manner compatible with the `read` function. | `~_minColumns_,_colInc_,_minPad_,_padChar_**s**`. | Prints `read`-compatible without justification. | Prints `NIL` as empty list `()` instead of `NIL`. | Pads on the left instead of the right side. | Pads on the left and prints `NIL` as `()`. |
- | w, W | Prints the argument in accordance with the printer control variables. | `~**w**`. | Prints in accordance with the currently set control variables. | Enables pretty printing. | Ignores print level and length constraints. | Ignores print level and length constraints and enables pretty printing. |
- | * | Prints a line break according to the pretty printer rules. | `~***`. | Prints a line break if a single line is exceeded. | Prints a line break if no single line preceded. | Uses a compact (_miser_) style. | Always inserts a line break. |
- | < | Justifies the output. | `~*minColumns*,*colInc*,*minPad*,*padChar*<***expression*****~**>`. | Left-justifies the output. | Adds left padding (= right-justifies). | Adds right padding (= left-justifies). | Centers the text. |
- | i, I | Indents a logical block. | `~i`. | Starts indenting from the first character. | Indents starting from the current output position. | Invalid | |
- | / | Dispatches the formatting operation to a user-defined function. | `~*prefixParams*/***function***/`. | Depends on the function implementation. | | | |
- | t, T | Moves the output cursor to a given column or by a horizontal distance. | `~*columnNumber*,*columnIncrement*t`. | Moves to the specified column. | Orients at section. | Moves the cursor relative to the current position. | Orients relative to section. |
- | * | Navigates across the format arguments. | `~*numberOfArgs****`. | Skips the `*numberOfArgs*` format arguments. | Moves `*numberOfArgs*` back. | Moves to the argument at index `*numberOfArgs*`. | Invalid |
- | [ | Prints an expression based upon a condition. | `~**[***clause1*~;...~;*clauseN*~:;*defaultClause*~**]**`. | The format argument must be a zero-based integer index, its value being that of the clause to select and print. | Selects the first clause if the format argument is `NIL`, otherwise the second one. | Only processes the clause if the format argument is `T`, otherwise skips it. | Invalid |
- | { | Iterates over one or more format arguments and prints these. | `~*numberOfRepetitions***{***expression*~**}**`. | A single format argument is expected to be a list, its elements are consumed in order by the enclosed directives. | Expects the format argument to be a list of lists, consuming its sublists. | Regards all remaining format arguments as a list and consumes these. | Regards all remaining format arguments as a list of sublists, consuming these sublists. |
- | ? | Substitutes the directive by the next argument, expected to be a format argument, using the subsequent format arguments in the new portion. | `~**?**`. | Expects the subsequent format argument to be a list whose elements are associated with the inserted control string. | Invalid | Expects separate format arguments instead of a list of these for the inserted portion, as one would specify in the usual manner. | Invalid |
- | ( | Modifies the case of the enclosed string. | `~**(**expression~**)**`. | Converts all characters to lower case. | Capitalizes all words. | Capitalizes the first word only, converts the rest to lower case. | Converts all characters to upper case. |
- | p, P | Prints a singular or plural suffix depending upon the numeric format argument. | `~**p**`. | Prints nothing if the argument equals 1, otherwise prints `s`. | Moves back to the last consumed format argument, printing nothing if it was 1, otherwise printing `s`. | Prints a `y` if the argument equals 1, otherwise prints `ies`. | Moves back to the last consumed format argument, printing `y` if it was 1, otherwise printing `ies`. |
- | ^ | Used in an iteration directive `~{*...*~}` to terminate processing of the enclosed content if no further format arguments follow. | `~*p1*,*p2*,*p3***^**`. | Operates as described. | Invalid | | |
- | _Newline_ | Skips or retains line breaks and adjacent whitespaces in a multi-line control string. | `~***Newline***`. | Skips the immediately following line break and adjacent whitespaces. | Skips the immediately following line break, but retains adjacent whitespaces. | Retains the immediately following line break, but skips adjacent whitespaces. | Invalid |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement