Re: Unions in Fortran



James Giles wrote:

<snip>

I wouldn't support unions unless they were tagged (discriminated)
and the tags were enforced. That is, all languages with unions
say something to the effect that after you assign the entity one way
it's illegal to access the other, but most provide no protection
against such violations. It's fairly easy for such a protection
feature to be implemented, it just requires more information
be stored with the union to hold the tag and some extra syntax
to make testing and setting the tags clear.

I imagine such tags would require a strong enumeration type.

<snip>

--
Cheers!

Dan Nagle
Purple Sage Computing Solutions, Inc.
.



Relevant Pages

  • Re: Debugging IE
    ... If you embed valid HTML tags in undefined tags it does work: ... Even when working with valid elements/tags innerHTML has it's issues. ...
    (comp.lang.javascript)
  • Re: Unions in Fortran
    ... as part of the C interoperability. ... I wouldn't support unions unless they were tagged ... to make testing and setting the tags clear. ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: Regular expressions question
    ... Bigus shared these words of wisdom: ... I need one that handles both - basically i need it to insert missing closing ... tags where one is needed - i've no idea what will be in between and ...
    (alt.os.linux)
  • Re: 3vl 2vl and NULL
    ... >I think of modeling data with both tags and values. ... >Take a simple screen for displaying a person's first name, last name, ... The data model for the screen is not in 1st normal form and SQL ...
    (comp.databases.theory)
  • Re: document.write and problems with how it overwrites existing code
    ... document.write can only modify the document while it is being loaded ... you will have to use DOM methods. ... you are only inserting text (no tags), ...
    (comp.lang.javascript)