Re: D5 Constant expression expected
From: Marco van de Voort (marcov_at_stack.nl)
Date: Sun, 18 Apr 2004 18:00:44 +0000 (UTC)
On 2004-04-18, Maarten Wiltink <email@example.com> wrote:
> "Marco van de Voort" <firstname.lastname@example.org> wrote in message
>> On 2004-04-16, Jens Björnhager <email@example.com> wrote:
>>> Why is not my constant-in-a-record treated as a constant?
>> It is not a true constant, but a memory reference (structured constant).
>> iow you could change the constant record with pointers in some
>> implementations, which is why it is disallowed.
> It's still possible to resolve it at compile time.
Yes of course. We could also interpret it with passcript.
> I'd much rather have the obscure bugs that result from illicitly changing
> the memory where constants are stored than this behaviour of treating some
> constants as more constant than others.
I don't see why it would be needed anyway. It only complicates the compiler
to avoid some stupid odd ball case to fail.
IOW I don't see a theoretical reason (since it is no real constant, you can
also declare it the same with VAR), and no practical reason why this should