Re: [BLACKBOX] CONST compiler bug ?

From: Campbell, Robert (SELEX GALILEO, UK) <robert.d.campbell{([at]})nowhere.xy>
Date: Wed, 25 May 2011 09:08:46 +0100


Thanks Doug, that was useful.
 
 
In fact I have now understood what I was missing, and why I was confused.
 
I read "The suffix 'L' is used to specify 64-bit constants", which I immediately associated
with LONGINTs. But that is not its purpose.
 
I had overlooked, or forgotten, that 'L' denotes a HEXADECIMAL constant, so its use is to distinguish
between
 
 0FFFFFFFFH, which is -1
&
 0FFFFFFFFL, which is 4294967295.
 
 
This is clearly explained in the Report, so I have no excuse!
 
 
Cheers
 
 
Robert
 
 
PS - The ash cloud between Scotland and ETH, Zurich seems to be a bit thinner today.
 
 

Robert,
I found it.
In appendix A of the language report I find under Assignment compatible

5. Tv is a numeric type and e is a constant expression whose value is contained in Tv;

The key word is "contained".

-Doug
 
 


I don't think the code below should compile or run, but it seems to.
Am I missing something?
Cheers
Robert
 
PROCEDURE Foo*;
VAR
n : INTEGER;
BEGIN
n := 1L
END Foo;


SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Wed May 25 2011 - 10:08:46 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:14 UTC