[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DEC Pascal Bug Reports |
Notice: | New kit announcement in TURRIS::Pascal conference |
Moderator: | TLE::GARRISON |
|
Created: | Wed Sep 09 1992 |
Last Modified: | Fri May 30 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 838 |
Total number of notes: | 3659 |
826.0. "Problem when two externals are actually at the same address" by TLE::GARRISON (Meg) Mon Feb 10 1997 13:32
The following program shows a problem we discovered while looking into note 810.
The side effects package doesn't handle EXTERNALs exactly right in strange cases
like the one below, where two externals actually represent the same variable.
(kind of like pointer aliasing)
program bug(output);
var
myglob : [GLOBAL] integer;
myvar : [EXTERNAL (myglob)] integer;
myvar2 : [EXTERNAL (myglob)] integer;
begin
myvar := 10;
write(myvar);
myvar2 := 100;
write(myvar, myvar2);
write(myvar);
write(myglob);
end.
The compiler gets the answer here as
10 10 100 10 100
T.R | Title | User | Personal Name | Date | Lines
|
---|