Please enable JavaScript to view this site.

ESL Documentation

ESL supports alternate positive and negative signs in entry fields defined for numberonly and floatonly validation and within integer and float columns in tables. ESL supports alternate signs for user entry, for validation with entry fields, and for display within tables.

A user may enter a leading sign, a trailing sign, or parentheses as the sign for a number. Using no sign character indicates a positive number. For example, the following positive and negative numbers are valid:

Positive numbers:

5

+99.5

500+

Negative numbers:

-6.3

62-

(640.5)

Only a single sign character or a single set of parentheses is allowed for a number.

When ESL validates the entry field, it accepts any of the positive or negative signs.

Tables can display numbers using alternate signs if the column format is set appropriately' for example, format string "(a)", "0-", or "0+". However, entry fields do not support the display of numbers using alternate positive and negative signs. The ESL application itself must support this display by formatting the values before setting the entry field text.

For example, the following code segment formats a negative floating point value for display in an entry field using parentheses as the negative sign.

 

float F_FV string Str_SV 

 

if (F_FV >= 0) then 

 copy F_FV to Str_SV 

else 

 copy "(" -F_FV ")" to Str_SV 

end if 

 

change EntryField_EF to Str_SV 

 

Alternate positive and negative signs are not supported by other parts of ESL; for example, they are not supported by the copy or extract statements. Other parts of ESL consider a leading sign to be the indicator for a number's sign. Thus, when the text of statement queries the value in the entry field, any alternate positive or negative sign is replaced with a leading sign in the returned text.

Note: Tables objects convert the entry to an integer or float before returning it to the ESL program.

The interface to the rest of the ESL program is maintained.