Actually, I am working on a lexical analyzer and parser for a future product.
The issue is that we have three formats (binary, decimal, and hexadecimal) and three lengths (4, 8, and 16). Clearly, we must have a letter to indicate the start of the exponent. However, a numeric literal may not have an exponent. Therefore, it does not seem prudent to use that exponent initiator to specify either the length or the format. The best approach would seem to be to permit 0-2 suffix letters to a numeric literal which will identify the format and length. If we use "E"/"e" to indicate an exponent, then we cannot use "E"/"e" as a suffix character, since we are unable to distinguish the context properly. So we need to determine what characters should be used for the various formats and lengths. Should we care in which order the format and length characters are specified? If format and/or length characters are not specified, how should we determine what format and/or length should apply to the numeric literal? Obviously, we can look at the number of digits specified and the value of the exponent, if any. However, in many cases these will be insufficient. We can look and the surrounding context, but that adds a level of complexity which may not be necessary. Ideas and suggestions, please. John P. Baker -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Binyamin Dissen Sent: Sunday, April 27, 2008 1:06 PM To: [email protected] Subject: Re: Fixed-Point and Scientific Notation Typically E is used for short, D is used for long and L is now being used for double long. Should be. 1.5E+0 - short. 1.5D+0 - long. 1.5L+0 - double long. What are you trying to do? Determine an interchange format? -- Binyamin Dissen <[EMAIL PROTECTED]> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

