Eike Lange wrote:
On Tue, Nov 19, 2002 at 10:49:42AM -0000, Wood David wrote:
what if aType changes from Circle to Rect. Does a previously set value for Radius become inaccessible?
Yes, I think so.
Yes, 6.5.3.3:
: When a variant becomes nonÂactive, all of its components shall become : totallyÂundefined.
If aType returns to Circle, is the value erased or is the previous value accessible once again?
IMHO, Radius and Width share the same Memory.
That's not guaranteed and is indeed not true in some cases in GPC. Relying on this is very unportable.
If someone would change Radius, Width would change its value, independent of setting aType.
Maybe, maybe not. It's undefined.
My questions are:
- is my idea conform to some standards?
- how _should_ GPC behave?
If there are any better examples outside, I'd like to know about them. I could live with the actual implementation of variant records, but would like to clarify this point.
AFAICS, the current implementation is ok, but we might add (optional) runtime checks in the future (which is also ok).
Frank