‎2009 Jun 18 9:53 AM
Hi,
We have 4 types of literals in SAP.Character,numeric,floating-point & hexadecimal literals.Can anyone give the examples for floating-point & hexadecimal literals?When and where it is used?
‎2009 Jun 18 9:59 AM
Please search before posting these questions...
Anyways...
Floating-point literals are specified within single quotes as '<mantissa>E<exponent>'. The mantissa can be specified with a leading sign and with or without decimal places, and the exponent can be signed or unsigned, with or without leading zeros. For example, '9.99E9', '-10E-32', and '+1E09' are valid floating-point literals.
A hexadecimal literal is specified within single quotes as if it were a character string. The permissible values are 0-9 and A-F. There must be an even number of characters in the string, and all characters must be in uppercase.
Examples of valid hexadecimal literals are '00', 'A2E5', and 'F1F0FF'. Examples of invalid hexadecimal literals are 'a2e5' (contains lowercase characters), '0' (contains an uneven number of characters), "FF" (enclosed in double quotes), and x'00' (should not have a preceding x).
Hexadecimal values are rarely used in ABAP/4, because they are usually machine-dependent. The use of a hexadecimal value that creates machine dependence should be avoided.
‎2009 Jun 18 1:00 PM
Hi Vin,
Thanks for ur reply.I know what u have mentioned.But what i need is example of those types.that is when and where it is used.