Page History
...
Please review the general 1.1.1 Field Type Considerations.
Field Definition Rules
Rules for defining a Float field in the repository are:
...
Partition Type | |
|---|---|
Files | Floats may only be used in RDMLX Files. Floats may be used as real fields. Use of Floats as key fields is not recommended. |
Logical Views | Use of Floats as key fields is not recommended. |
Virtual Fields | Floats may only used with Mathematical Virtual Fields. Floats may be used as the source field(s). |
Predetermined Join Fields | Floats may be used for numeric predetermined joined fields. |
RDML Commands | Fields of type Float may only be used in an arithmetic expression. |
Built-In Functions | When used in Built-In Functions, floats are valid for arguments of type 'N'. |
Special Values | *NULL, *NAVAIL, *HIVAL, *LOVAL, *REMEMBERED_VALUE |
Conversion | It is wrong to convert Floats to/from Date and Time fields. Refer to Field Type Conversions. |
Usage Notes
- Working fields may be defined as TYPE(*FLOAT) in functions or components. If no length is specified, the default of 8 is assumed.
- Fields of type Float may only be used in an arithmetic expression. Use of a Float as a command parameter that is not an arithmetic expression will result in a FFC Error. For example, a Float cannot be used in a BEGIN_LOOP command.
- Floats are generally not considered suitable as a numeric argument to a BIF.
- Exact comparisons using Floats is not recommended due to inaccuracy of the type. For example, the value stored in the field or saved in the table may not be exactly what was assigned to the field. However, comparison to *ZERO or *SQLNULL is fine.
...
- Floats are generally used in scientific or engineering applications and are not generally used in business applications.
- Floats are primarily supported in LANSA for use with Other Files and are not recommended for use in business applications.