Einzelnen Beitrag anzeigen
Alt 25.05.2007, 15:29   #3
waldbauer.com
Entwickler
Beschreibung vorhanden OSA CVTNUM

E r g e b n i s / R e s u l t

Wandelt eine Zahl in eine formatierte Zeichenkette um
Converts a number to a formatted string

B e s c h r e i b u n g / D e s c r i p t i o n

Many users have complained that is difficult to read large numbers in an Open Access screen form as there is no grouping (commas to Indicate
thousands.) Also users printing numbers in print forms have requested more options. CVTNUM answers these requests by formatting a number according to the user's requirements. The user can specify the width and precision of the resultant string as well as a number of options that control justification, how to display negative numbers and currency.

S y n t a x

Code:
string = call ('CVTNUM' , value , width , precision , option)
P a r a m e t e r

string - is the returned Open Access string containing the
formatted string.
value - is any integer or decimal value.
width - the user determines how wide the result string will be.
precision - the number of decimal places the result is displayed to.
options - the following options are available -
'A' Justify right
'B' Justify centre
'C' Justify on the decimal point
'D' Place CR or DB after number
'E' Put ( ) around debit values
'F' Put oe at start of number
'G' Put $ at start of number
'H' Put Ÿ at start of number
'I' Put • at start of number
'J' Put ž at start of number
'K' Put DM at end of number
'L' Insert leading zeroes
'M' Grouping

R e t u r n s
A string containing the formatted number

B e i s p i e l / E x a m p l e

Code:
 
attach 'CONVERT'
put call ('CVTNUM' , 10345.456 , 15 , 2 , 'FM') ! prints oe 10,345.46
detach 'CONVERT'
Angehängte Dateien
Dateityp: oac convert.oac‎ (17.0 KB, 4x aufgerufen)
waldbauer.com ist offline   Mit Zitat antworten