19.04.2013 Aufrufe

KURZBESCHREIBUNG VERIFIER - Ct-pen.com

KURZBESCHREIBUNG VERIFIER - Ct-pen.com

KURZBESCHREIBUNG VERIFIER - Ct-pen.com

MEHR ANZEIGEN
WENIGER ANZEIGEN

Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.

YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.

CT-PEN Technische Dokumentation FormVerifier © 2012 Rudolf Reinthaler Seite 44<br />

Characters for a PICTURE mask can follow the characters for the PICTURE function. When a<br />

mask is also specified, the PICTURE function and mask must be separated from one another by<br />

a single blank space.<br />

PICTURE mask<br />

A PICTURE mask contains formatting rules for each individual character of the transformed<br />

value. As with the PICTURE function, formatting characters are specified which define a specific<br />

formatting rule. Each character in the PICTURE mask corresponds to a character in the<br />

return character string. The possible formatting characters for a PICTURE mask are listed in<br />

the following table:<br />

Characters for the PICTURE mask<br />

Character Formatting rule<br />

A,N,X,9,# Displays characters for each data type<br />

L Displays logical values as "T" or "F"<br />

Y *) Displays logical values as "Y", "J" or "N"<br />

! Transforms alphabetical characters to upper case<br />

$ Replaces leading blank spaces in numbers<br />

with a dollar sign ($)<br />

* Replaces leading blank spaces in numbers<br />

with a star (*)<br />

. Marks position for a decimal point<br />

, Marks position for a <strong>com</strong>ma<br />

*) Display is country-specific, see SetLocale()<br />

Any characters in the PICTURE mask which are not listed in this table are copied into the<br />

return character string. When the PICTURE function @R is used, these characters are inserted<br />

into the return character string, otherwise they replace characters in the return character<br />

string.<br />

Country-specific formatting of numbers<br />

When transforming numbers to character strings, Transform() uses the number format set by<br />

the system configuration which results in a decimal point or <strong>com</strong>ma after each setting. When<br />

converting a numeric to a string and a decimal point is desired instead of a decimal <strong>com</strong>ma<br />

regardless of the system configuration, the numeric value should be transformed by the function<br />

Str() instead of Transform(). Example:<br />

nNumber := 12.345<br />

cStringA := Transform( nNumber, "@N" ) // may result in<br />

// "12,345" or "12.345"<br />

cStringB := Str( nNumber, 6, 3 ) // is always "12.345"<br />

nNumberA := Val( cStringA ) * 10 // may result in<br />

// 120 or 123.45<br />

nNumberB := Val( cStringB ) * 10 // is always 123.45<br />

When using Transform() to perform conversions and the <strong>com</strong>ma is defined as the delimiter for<br />

decimal places in the system settings, a <strong>com</strong>ma is inserted into the formatted result string.<br />

Changing the character string back to a numeric value using the function Val() may then lead<br />

to erroneous results since Val() only works with a decimal point and not with a decimal<br />

<strong>com</strong>ma.<br />

Example<br />

// Transform()<br />

// The example demonstrates how various values can be<br />

// formatted by Transform().<br />

PROCEDURE Main<br />

LOCAL xValue<br />

© b y R u d o l f R e i n t h a l e r S o f t w a r e e n t w i c k l u n g • A l t e r b a c h s t r a s s e 6 • A - 5 0 2 0 S a l z b u r g<br />

w w w . c t - p e n . c o m • K O N T A K T : r . r e i n t h a l e r @ c t - p e n . c o m

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!