home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!bigboote.WPI.EDU!wpi.WPI.EDU!gregs
- From: gregs@wpi.WPI.EDU (Floppy)
- Newsgroups: comp.lang.pascal
- Subject: Re: I found a compiler bug in TP6.0, maybe...
- Date: 23 Nov 1992 16:07:01 GMT
- Organization: Worcester Polytechnic Institute
- Lines: 35
- Message-ID: <1eqvj5INNprl@bigboote.WPI.EDU>
- References: <1992Nov23.061222.3675@u.washington.edu> <JgLouB1w165w@abyss.wa.com>
- NNTP-Posting-Host: wpi.wpi.edu
-
- In article <JgLouB1w165w@abyss.wa.com> milton@abyss.wa.com (Steve Milton, Sysop) writes:
- >nobby@byron.u.washington.edu (Vitaly Shmatikov) writes:
- >
- >> In article <1992Nov22.192602.16440@crash> tech@crash.cts.com (Don Bontemps) w
- >> >
- >> >When I attempt to compile the following code, I get a runtime error 202.
- >[Some lines deleted.]
- >> >
- >> > num : word = 0;
- >> >
- >> >
- >> >begin
- >> >
- >> > writeln(days[num-1]);
- >> >
- >> >end.
- >> >
- >> >
- >>
- This really is a bug. The manual clearly states that when an
- arithmetic expression contains two integral types, both numbers will first be
- converted to the smallest integral type containing the entire range of both of
- the original types. In this case, the smallest such type is longint, since
- the two original types were word and shortint.
-
- Greg
-
- +-------+ Greg Snyder alias Floppy alias Brocolli Man IS gregs@wpi.wpi.edu
- | [ [Witty quote ommitted until further notice] *:^)
- | O |
- | | ` | Worcester Polytechnic Institute, Worcester MA
- +-------+ --------------------------------------------------------------
-
-
-
-