Re: Sub definition

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On 2009-09-13, Scott M. <s-mar@xxxxxxxxxxxxx> wrote:
The are markers that delinate a compiler "attribute", which is basically a
special instruction just for the compiler. They are a way to mark, not only
a Sub (you can use them on almost all class members), with extra information
that the compiler needs to know.

-Scott


Hmmm.. While there are some attributes that affect compile time behavior (for
example, ObsoleteAttribute) - most attributes are processed at runtime. They
are markers that can be used by other classes to gain additional information
about the class, property, or method. For instance, the attributes that you
can place on the properties of a class to influence the behavior of the
PropertyGrid.

One place I use them is for mapping object properties to fields in a dataset
at runtime - sort of a simplified ORM tool.

--
Tom Shelton
.



Relevant Pages

  • Re: F200x status?
    ... I don't like using the suffix to indicate the standard version number. ... To me, the useful distinction was in fixed vs free source form, in that ... a need to tell this to the compiler. ...
    (comp.lang.fortran)
  • Re: complier problem
    ... to apply the '++' operator to it and the compiler will disallow it. ... Without having this extra information, ... expression might produce undefined behavior. ...
    (comp.lang.c)
  • Re: Nasm 0.99.01 available
    ... "Jim Carlock" wrote... ... I've run into a missing file it appears... ... It appears to be something involved with a specific compiler. ... Found some extra information here... ...
    (alt.lang.asm)
  • Re: restrict
    ... > provide extra information that the compiler cannot ... The restrict keyword does *not* provide any extra information ... It simple allows the programmer to *lie* to the C compiler. ... source and destination arrays do *not* overlap. ...
    (comp.lang.c)
  • Re: template parameters are hidden by class members
    ... >> compiler accepts it and the gcc 3.4compiler rejects it and ... >> hidden by class members. ... > of declaration until the end of its template. ... > which supports the result you are getting form Comeau. ...
    (comp.lang.cpp)