From: presbeis@look.ca (FGD)
Subject: Re: System.Address'Size - not a static integer expression?
Date: 8 Mar 2002 10:34:08 -0800
Date: 2002-03-08T18:34:08+00:00 [thread overview]
Message-ID: <7f1fa3aa.0203081034.12a7bd11@posting.google.com> (raw)
In-Reply-To: 3C877185.1CF93423@despammed.com
Wes Groleau <wesgroleau@despammed.com> wrote in message news:<3C877185.1CF93423@despammed.com>...
> > > a.ads:12:33: static integer expression required here
> > >
> > > Is this a compiler bug?
> >
> > No, it is a correct diagnostic, this is not a static
> > expression.
>
> Vadim, I had the same misunderstanding at one time,
> so perhaps I can clarify:
>
> The 'Size attribute, even though "static" in nature
> much of the time is officially defined as non-static
> in the RM, and therefore not allowed where a "static"
> value is required.
>
> In other words, compilers are required to pretend
> that they don't know the value of 'Size at compile
> time. Sometimes the value is known, sometimes not,
> so it's simpler to pretend it's always unknown.
I've wondered about this in the past, I can't remember any "official"
justification for this. Why does the RM say it's not static? It
requires static expression when defining it. Only unconstrained types
can have non-static 'Size. (Am I missing something?) Maybe it's a
language simplification, but a very inconvenient one...
-- Frank
next prev parent reply other threads:[~2002-03-08 18:34 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-06 17:57 System.Address'Size - not a static integer expression? Vadim Godunko
2002-03-07 1:21 ` Robert Dewar
2002-03-07 13:56 ` Wes Groleau
2002-03-08 18:34 ` FGD [this message]
2002-03-08 19:07 ` Larry Kilgallen
2002-03-08 19:43 ` Wes Groleau
2002-04-08 4:57 ` Robert Dewar
2002-04-08 15:17 ` Wes Groleau
2002-04-10 1:54 ` Robert Dewar
2002-04-10 17:41 ` Wes Groleau
2002-04-10 18:29 ` Darren New
2002-04-12 20:20 ` Robert Dewar
2002-04-12 21:10 ` Wes Groleau
2002-04-14 19:59 ` Robert Dewar
2002-04-14 20:01 ` Robert Dewar
2002-04-15 15:13 ` Wes Groleau
2002-04-15 19:57 ` Randy Brukardt
2002-04-17 3:22 ` Robert Dewar
2002-04-17 3:11 ` Robert Dewar
2002-04-17 18:27 ` Wes Groleau
2002-04-19 14:06 ` Robert Dewar
2002-04-19 15:05 ` Wes Groleau
2002-04-20 2:26 ` Robert Dewar
2002-04-20 5:11 ` Robert Dewar
2002-04-20 16:50 ` Darren New
2002-04-22 9:20 ` Ole-Hjalmar Kristensen
2002-04-22 13:24 ` Robert Dewar
2002-04-22 13:59 ` Ole-Hjalmar Kristensen
2002-04-22 13:34 ` Robert Dewar
2002-04-22 14:02 ` Ole-Hjalmar Kristensen
2002-04-22 16:11 ` Jean-Pierre Rosen
2002-04-22 23:57 ` Robert Dewar
2002-04-08 0:43 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox