Help with Format function.

Do you know about any doc, which may comprehesible describe FORMAT() function with FormatString? I created my own FormatStrings due to syntax in *.hlp file (NF 3.60F) - some of them works, some not.

Hi . could you be more specific on what you want, or may be the cases u deem it doesnot work, i can make a document for you. regards venax

In help file I read following: Building Formats The Format property also lets you create your own formats. To create a format, use the syntax described below and keep in mind these rules: · A format property consists of zero or more Chars, Fields or Attributes. · Fields and Attributes are expressed with an identifier inside brackets (<>). · Attributes require a comma (,) and a parameter after the identifier. · Fields optionally take a comma (,) and a FieldLen. The concise syntax is: FormatProperty := [ | | ] := character with ASCII value [32…255] := ‘<’ [’,’ ] ‘>’ [, ] := literal name of field (format component) := length of field (0 or missing means that length is dynamic) := [’<’ ‘,’ ‘>’] := [Standard Format | Filler | 1000Character | Comma | Overflow | Filler Character | Precision] ,but few lines down i read: Using a standard format with an attribute: <Precision,2:><Standard Format,0> I tried format Decimal: _Dec:=123,56; FORMAT(_Dec,0,’<Precision,2:>’); but this didn’t work. then I tried: _Dec:=123,56; FORMAT(_Dec,0,’<Precision,2:>’); …and i get the right value. But this code is not correctly with syntax described in help.

Hi Rudidlo, It is consistent with the format syntax. As you can see the Format Property can be a char or a field or an attribute. So since the first example did not work it simply means that Attribute “Precision” must be at the beginning. I personally do not use that anyway. I use <Integer,6><Decimals,3> for instance. Note the ,3 for decimals. You must include the decimal point also in the number of chars counted for decimals. Regards, Cristi Nicola

Thanks for description. I would feel better if anyone can describe me Attribute usage.