From: marc@anyware.co.uk (Marc Palmer) Subject: Int64 range checking broken? Date: 08 May 1999 00:00:00 GMT Message-ID: X-NNTP-Posting-Host: anyware.demon.co.uk:193.237.14.77 X-Trace: news.demon.co.uk 926123131 nnrp-01:7779 NO-IDENT anyware.demon.co.uk:193.237.14.77 Organization: AnyWare Ltd. Newsgroups: comp.lang.pascal.delphi.misc X-Complaints-To: abuse@demon.net Hi, Maybe it's just too late at night for my brain to work properly, but when I execute this code in Delphi 4: var X : Int64; begin {$R+}{$Q+} X := 1; repeat X := X *256; until False; end; It *should* raise an ERangeError or EOverflowError exception shouldn't it? It doesn't! X just becomes zero once it gets past 2^63! I found this in some other code where it is not multiplying by 256, and the number freaks out, going negative etc. before flipping to zero. What's going on here? Delphi Bug? This is a real pain in the ass... Cheers ------------------------------------------------------ Marc Palmer, AnyWare Ltd. AppTools VCL http://www.anyware.co.uk/anyware/apptools