Representation of numeric values in character-type fields
The values of data objects of character-type data types can be assigned to data objects of numeric types
i, p und
f if they have the valid representation of a number. The following character strings are valid numbers:
- Mathematical Notation
An uninterrupted sequence of numbers that may contain,
maximum, one period symbol (.) as a decimal separator. An arbitrary number of blanks may be in front
of and behind the sequence of digits. There can be exactly one plus/minus sign "+" "-" in front of the
digit sequence. The position of the plus/minus sign is arbitrary. We recommend placing it directly in front of the digit sequence.
- Commercial Notation
Like the mathematical notation, with the difference that
exactly one sign "+" or "-" can be after the digit sequence. The position of the plus/minus sign is arbitary. We recommend assigning it directly after the digit sequence.
- Scientific Notation
An uninterrupted sequence of a mantisse and an exponent.
The mantisse is an uninterrupted sequence of a plus/minus sign "+" or "-" and a digit sequence that
can have a maximum of one period (.) as a decimal separator. The exponent is an uninterrupted sequence
of the character "E" or "e", a "+" or "-" sign and a digit sequence. The number value is the value of the mantisse multiplied by ten to the power of the value that is after the character "E" or "e".
There can be any number of blanks in front of the number. If there is a blank after the number, this closes the number. Any characters ater this will be ignored.
Parts of the notation that are not required, such as the plus/minus sign or the specification of the exponent, can be omitted.
If a character-type field begins with a blank followed by a valid number, the content of the field is interpreted as a number with the value 0.
Notes
- The three different notations have an intersection that can be interpreted in each notation with
the same result - that is, an uninterrupted sequence of numbers with a maximum of one decimal separator.
For a common, interpretable intersaction of the mathematical notation with the scientific notation, a plus/minus sign can be placed directly in front of this digit sequence.
- Different handling of blanks in the different notations should be noted. For example, while the
character sequence " - 123.456" in the mathematical notation has the value -123 ,456, the above rule
in scientific notation would result in value 0. The character "-" followed by a blank is interpreted
there as the number and the following characters "123.456" are ignored. For this reason, plus/minus signs should always be aligned directly in front of the digits.