RE: [sv-bc] In-line variable initialization

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Thu Apr 20 2006 - 00:44:15 PDT
I don't think so.

6.6. says, "Data declared in a static task, function, or block default
to a static lifetime and a local scope."

I don't see anywhere in the LRM a hint that there is a difference in
this between a declaration with and without an initializer.

Shalom


> I believe that if you want to declare a static variable with an
> initializer in a block, you have to use an explicit "static"
qualifier,
> even if you are not in a block where they would default to being
> automatic.  This is intended to remind you that as a static variable,
> it will only be initialized once at the start, not whenever the
> block is entered.  Otherwise the visual appearance might be
misleading.
Received on Thu Apr 20 00:45:53 2006

This archive was generated by hypermail 2.1.8 : Thu Apr 20 2006 - 00:46:24 PDT