Revision history for KeyPgEnum


Revision [23731]

Last edited on 2019-10-24 15:43:17 by fxm [completed description]
Additions:
##**Enum**## can not contain any member procedure or member data (only symbols), but it can be included (named or unnamed) in a ##[[KeyPgType|Type]]## by having.
An ##**Enum**## instance can be passed, as any user defined instance, to a procedure (including for the definition of ##[[KeyPgOverload|Overload]]##ed operators).
The size of an ##**Enum**## instance will be always that of an ##[[KeyPgInteger|Integer]]## (no matter how many defined symbols are just declarations for the compiler assignment).
Deletions:
An ##**Enum**## can be passed as a user defined type to ##[[KeyPgOverload|overload]]##ed operator functions.


Revision [20915]

Edited on 2016-03-12 17:14:25 by fxm [Formatting]

No Differences

Revision [20218]

Edited on 2016-02-10 15:59:41 by DkLwikki [Update link format]
Additions:
An ##**Enum**## is a useful way of grouping together a set of related ##[[KeyPgConst|const]]##ants. A symbol can be accessed like a constant, e.g: ##a = //symbolname//##. But if the name clashes with another symbol, it must be resolved using ##//typename//.//symbolname//##. This resolution method is always required if you make the enum ##Explicit##.
A non-##Explicit## ##**Enum**## declared inside an ##[[KeyPgExternBlock|Extern ... End Extern]]## block will add its constants to the parent namespace directly, as in C, instead of acting as a namespace on its own. It disallows the ##//typename//.//symbolname//## style of access, and the constants may conflict with other symbols from the parent namespace.
An ##**Enum**## can be passed as a user defined type to ##[[KeyPgOverload|overload]]##ed operator functions.
- Explicit Enum not available in the //[[CompilerOptlang|-lang qb]]// dialect unless referenced with the alias ##**""__Explicit""**##.
- ##[[KeyPgConst|Const]]##
- ##[[KeyPgOperator|Operator]]##
Deletions:
An ##**Enum**## is a useful way of grouping together a set of related ##[[KeyPgConst const]]##ants. A symbol can be accessed like a constant, e.g: ##a = //symbolname//##. But if the name clashes with another symbol, it must be resolved using ##//typename//.//symbolname//##. This resolution method is always required if you make the enum ##Explicit##.
A non-##Explicit## ##**Enum**## declared inside an ##[[KeyPgExternBlock Extern ... End Extern]]## block will add its constants to the parent namespace directly, as in C, instead of acting as a namespace on its own. It disallows the ##//typename//.//symbolname//## style of access, and the constants may conflict with other symbols from the parent namespace.
An ##**Enum**## can be passed as a user defined type to ##[[KeyPgOverload overload]]##ed operator functions.
- Explicit Enum not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Explicit""**##.
- ##[[KeyPgConst Const]]##
- ##[[KeyPgOperator Operator]]##


Revision [17084]

Edited on 2014-05-26 14:14:52 by DkLwikki [Document Enums' behaviour in Extern blocks]
Additions:
A non-##Explicit## ##**Enum**## declared inside an ##[[KeyPgExternBlock Extern ... End Extern]]## block will add its constants to the parent namespace directly, as in C, instead of acting as a namespace on its own. It disallows the ##//typename//.//symbolname//## style of access, and the constants may conflict with other symbols from the parent namespace.
Deletions:
An ##**Enum**## declared inside an ##[[KeyPgExternBlock Extern ... End Extern]]## block and without the use of ##Explicit## on the other hand will add its constants to the parent namespace directly, as in C, instead of acting as a namespace on its own. It disallows the ##//typename//.//symbolname//## style of access, and the constants may conflict with other symbols from the parent namespace.


Revision [17083]

Edited on 2014-05-26 14:13:24 by DkLwikki [Document Enums' behaviour in Extern blocks]
Additions:
An ##**Enum**## declared inside an ##[[KeyPgExternBlock Extern ... End Extern]]## block and without the use of ##Explicit## on the other hand will add its constants to the parent namespace directly, as in C, instead of acting as a namespace on its own. It disallows the ##//typename//.//symbolname//## style of access, and the constants may conflict with other symbols from the parent namespace.
Deletions:
An ##**Enum**## declared inside an ##[[KeyPgExternBlock Extern ... End Extern]]## block on the other hand will add its constants to the parent namespace directly, as in C, instead of acting as a namespace on its own. It disallows the ##//typename//.//symbolname//## style of access, and the constants may conflict with other symbols from the parent namespace.


Revision [17082]

Edited on 2014-05-26 13:33:35 by DkLwikki [Document Enums' behaviour in Extern blocks]
Additions:
An ##**Enum**## is a useful way of grouping together a set of related ##[[KeyPgConst const]]##ants. A symbol can be accessed like a constant, e.g: ##a = //symbolname//##. But if the name clashes with another symbol, it must be resolved using ##//typename//.//symbolname//##. This resolution method is always required if you make the enum ##Explicit##.
An ##**Enum**## declared inside an ##[[KeyPgExternBlock Extern ... End Extern]]## block on the other hand will add its constants to the parent namespace directly, as in C, instead of acting as a namespace on its own. It disallows the ##//typename//.//symbolname//## style of access, and the constants may conflict with other symbols from the parent namespace.
Deletions:
An ##**Enum**## is a useful way of grouping together a set of related ##[[KeyPgConst const]]##ants. A symbol can be accessed like constant, e.g: ##a = //symbolname//##. But if the name clashes with another symbol, it must be resolved using ##//typename//.//symbolname//##. This resolution method is always required if you make the enum ##Explicit##.


Revision [16131]

Edited on 2012-02-23 07:08:39 by YetiFoot [modd2]
Additions:
- Explicit Enum not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Explicit""**##.
Deletions:
- Explicit Enum not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the aliases ##**""__Explicit""**##.


Revision [16130]

Edited on 2012-02-23 07:08:16 by YetiFoot [for modd]
Additions:
- Explicit Enum not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the aliases ##**""__Explicit""**##.
Deletions:
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the aliases ##**""__Enum""**## and ##**""__Explicit""**##.


Revision [13753]

Edited on 2008-09-30 10:52:16 by CountingPine [Remove second, obsolete "diff" section; minor edits]
Additions:
##**Enum**##, short for enumeration, declares a list of symbol names that correspond to discrete values. If no initial value is given, the first item will be set to ##0##. Each subsequent symbol has a value one more than the previous unless ##//expression//## is given.
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the aliases ##**""__Enum""**## and ##**""__Explicit""**##.
- New to ""FreeBASIC""
Deletions:
##**Enum**##, short for enumeration, declares a list of symbol names that correspond to discrete values. If no initial value is given, the first item will be set to 0. Each subsequent symbol has a value one more than the previous unless ##//expression//## is given.
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Enum""**##.
- Not available in the //[[CompilerOptlang -lang qb]]// dialect.
- New to FreeBASIC


Revision [13124]

The oldest known version of this page was created on 2008-04-24 15:41:43 by JeffMarshall [Remove second, obsolete "diff" section; minor edits]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode