On 26 May 2004 at 12:36, Frank Heckenbach wrote:
[...]
In particular, AFAICS in the following program, the `f' in `f^ := 3' must be a recursive call (yielding b), so b^ must be set to 3, and the program must say `1 3'.
BP, however, seems to think `f' is an lvalue before it sees the `^', so it sets the current function-result (which is a), dereferenced, to 3, and says `3 2'.
So, in contrast to the examples above, this is not an extension (i.e., some behaviour for a case otherwise invalid), but at least another incompatibility (if not to say, a violation of Pascal semantics) for a correct Pascal program, so I'm not sure if the whole thing is a bug or just a buggy feature.
program Foo (Output);
type PInteger = ^Integer;
[...]
BP prints "3 2" FreePascal prints "3 2" Virtual Pascal prints "3 2 " Delphi prints "1 3" TMT Pascal prints "1 3" GPC prints "1 3"
The score is 3/3. I'd rather go with Delphi than with BP. Borland probably saw the light somewhere along the line ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/