IF TEST = 1 { ASSIGN StringVal = "0013001.93912837" } //Returns a string formatted using the format specified. The format //applies only TO the numeric value contained within the variable. //See Numeric Format Specifiers in help documentation. //Below are some examples of Numeric Format Specifiers //C or c -- Currency //The number is converted to a string that represents a currency amount. //The conversion is controlled by the currency format information of the //current NumberFormatInfo object. //The precision specifier indicates the desired number of decimal places //IF the precision specifier is omitted, the DEFAULT currency precision //given by the current NumberFormatInfo object is used. ASSIGN CurrencyResult = "{StringVal.format('C')}" //E or e -- Scientific (exponential) //The number is converted to a string of the form "-d.ddd…E+ddd" or //"-d.ddd…e+ddd", where each 'd' indicates a digit (0-9). //The string starts with a minus sign IF the number is negative. //One digit always precedes the decimal point. //The precision specifier indicates the desired number of digits after //the decimal point. IF the precision specifier is omitted, //a DEFAULT of six digits after the decimal point is used. //The CASE of the format specifier indicates whether TO prefix the //exponent with an 'E' or an 'e'. The exponent always consists of a //plus or minus sign and a minimum of three digits. The exponent is //padded with zeros TO meet this minimum, IF required. ASSIGN ScientificResult = "{StringVal.format('E')}" //F or f -- Fixed-point //The number is converted to a string of the form "-ddd.ddd…" where each //'d' indicates a digit (0-9). The string starts with a minus sign //IF the number is negative. //The precision specifier indicates the desired number of decimal places. //IF the precision specifier is omitted, the DEFAULT numeric precision //is given by the NumberDecimalDigits property of the current //NumberFormatInfo object. ASSIGN FixedPointResult = "{StringVal.format('F3')}" //N or n -- Number //The number is converted to a string of the form "-d,ddd,ddd.ddd…", //where '-' indicates a negative number symbol IF required, 'd' indicates //a digit (0-9), ',' indicates a thousand separator between number groups, //and '.' indicates a decimal point symbol. The actual negative number //pattern, number group size, thousand separator, and decimal separator are //specified by the NumberNegativePattern, NumberGroupSizes, //NumberGroupSeparator, and NumberDecimalSeparator properties, //respectively, of the current NumberFormatInfo object. //The precision specifier indicates the desired number of decimal places. //IF the precision specifier is omitted, the DEFAULT numeric precision is //given by the NumberDecimalDigits property of the current //NumberFormatInfo object. ASSIGN NumberResult = "{StringVal.format('N')}" //P or p -- Percent //The number is converted to a string that represents a percent as defined //by the NumberFormatInfo.PercentNegativePattern property IF the number //is negative, or the NumberFormatInfo.PercentPositivePattern property //IF the number is positive. The converted number is multiplied by 100 //IN order TO be presented as a percentage. //The precision specifier indicates the desired number of decimal places. //IF the precision specifier is omitted, the DEFAULT numeric precision //given by the current NumberFormatInfo object is used. ASSIGN PrecentResult = "{StringVal.format('P2')}" //R or r --Round-Trip //This format is supported only FOR the Single and Double types. //The round-trip specifier guarantees that a numeric value converted //TO a string will be parsed back into the same numeric value. When a //numeric value is formatted using this specifier, it is first tested //using the general format, with 15 spaces of precision FOR a Double and 7 //spaces of precision FOR a Single. IF the value is successfully parsed back //TO the same numeric value, it is formatted using the general format //specifier. However, IF the value is not successfully parsed back TO the //same numeric value, then the value is formatted using 17 digits of //precision FOR a Double and 9 digits of precision FOR a Single. //Although a precision specifier can be present, it is ignored. //round trips are given precedence over precision when using this //specifier. ASSIGN RoundTripResult = "{StringVal.format('R')}" //0 -- Zero placeholder //If the value being formatted has a digit in the position where the '0' //appears IN the format string, then that digit is copied TO the result //string; otherwise, a '0' appears IN the result string. The position of //the leftmost '0' before the decimal point and the rightmost '0' after //the decimal point determines the range of digits that are always present //IN the result string. //The "00" specifier causes the value TO be rounded TO the nearest digit //preceding the decimal, where rounding away from zero is always used. //FOR example, formatting 34.5 with "00" would result IN the value 35. //The following example displays several values formatted using custom //format strings that include zero placeholders. ASSIGN ZeroPlaceholderResult1 = "{StringVal.format('P0')}" ASSIGN ZeroPlaceholderResult2 = "{StringVal.format('00')}"