Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!usc!polyslo!vlsi3b15!lehi3b15!lafcol!pilgrimk From: pilgrimk@lafcol.UUCP (Kenwyn A. Pilgrim) Newsgroups: comp.lang.pascal Subject: TP50: Typed constants Keywords: Hit to continue... Message-ID: <1356@lafcol.UUCP> Date: 19 Jul 89 19:07:32 GMT Organization: Academic Computer Center, Lafayette College Lines: 41 Today I discovered something really bizarre. I had two typed constants which looked like const CompOne : integer = 10; CompTwo : integer = 15; The value of these were changed just once in the program CompOne := 4; CompTwo := 7; So far so good. While running my program, I discovered that the variables CompOne & CompTwo didn't contain the values 4 and 7 respectively, but some values (they were actually values of some other typed constants). [I'm using graphics and haven't yet figured out how to debug while in graphics mode :-( ] After some fooling around, I decided to make these typed constants 'variables', i.e. var CompOne : integer; CompTwo : integer; and lo and behold, they didst come up with the values expected, namely 4 and 7. My question is: Is there a limit to the no. of typed constants? (my data size was < 2K bytes according to the Get Info option) or what else do you think is wrong? Remember, these variables were initialized only once and never again were they operated on - implicitly or explicitly. Your help would be appreciated. -Kenwyn