User Tools

Site Tools


pattern_pictures.htm
Navigation:  Language Reference > 3 - Variable Declarations > Picture Tokens >====== Pattern Pictures ====== Previous pageReturn to chapter overviewNext page

Quick List

@P[<;][#][x]P[B]

blk2blue.jpg

@P All pattern pictures begin with the @P delimiter and end with the P delimiter. The case of the delimiters must be the same.
<; Specifies an integer position that is blank for leading zeroes.
# Specifies an integer position.
X Represents optional display characters. These characters appear in the final result string.
P All pattern pictures must end with P. If a lower case @p delimiter is used, the ending P delimiter must also be lower case.
B Specifies that the format displays as blank when the value is zero.

Pattern pictures contain optional integer positions and optional edit characters. Only the integer positions will be stored. Any character other than <; or # is considered an edit character which will appear in the formatted picture string. The @P and P delimiters are case sensitive. Therefore, an upper case “P” can be included as an edit character if the delimiters are both lower case “p” and vice versa.

@P pictures can use any displayable Unicode characters. The maximum length is 255.

Pattern pictures do not recognize decimal points, in order to permit the period to be used as an edit character. Therefore, the value formatted by a pattern picture should be an integer. If a floating point value is formatted by a pattern picture, only the integer portion of the number will appear in the result.

Example:

Picture           Value       Result

@P###-##-####P    215846377    215-84-6377

@P<;#/##/##P       103159       10/31/59

@P(###)###-####P  3057854555   (305)785-4555

@P###/###-####P   7854555      000/785-4555

@p<;#:##PMp        530          5:30PM

@P<;#' <;#“P        506          5'  6”

@P<;#lb. <;#oz.P    902          9lb. 2oz.

@P4##A-#P         112          411A-2

@PA##.C#P         312.45       A31.C2

pattern_pictures.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1