Revision history for KeyPgVar


Revision [22594]

Last edited on 2019-02-27 09:38:11 by fxm [Suppressed reference to fbc version 0.17]
Additions:
- New to ""FreeBASIC""
Deletions:
- New to ""FreeBASIC"" 0.17


Revision [22338]

Edited on 2018-06-26 15:33:41 by fxm [Added link to "Pointers to procedures" page in "See also"]
Additions:
- [[ProPgProcedurePointers|Pointers to Procedures]]


Revision [21287]

Edited on 2016-04-01 08:00:07 by fxm [Added link to BYREF (variables)]
Additions:
- ##[[KeyPgByrefVariables|Byref (variables)]]##


Revision [21176]

Edited on 2016-03-13 11:41:21 by fxm [Formatting]
Additions:






Revision [20585]

Edited on 2016-02-10 16:10:28 by DkLwikki [Update link format]
Additions:
**Var** [[[KeyPgShared|shared]]] //symbolname// = //expression//[, //symbolname// = //expression//]
Note: ##[[KeyPgWstring|Wstring]]## is not supported with ##**Var**##, due to the fact that there is no var-len ##[[KeyPgWstring|Wstring]]## type. This isn't likely to change, due to the complexities involved with handling Unicode.
Since the type of the variable is inferred from what you assign into it, it's helpful to know how literals work. Any literal number without a decimal point defaults to ##[[KeyPgInteger|Integer]]##. A literal number //with// a decimal point defaults to ##[[KeyPgDouble|Double]]##. See [[ProPgLiterals]] for further information.
All ##[[KeyPgZstring|Zstring]]## expressions, including string literals and dereferenced ##[[KeyPgZstring|Zstring]]## ##[[KeyPgPtr|Ptr]]##s, will be given the ##[[KeyPgString|String]]## variable type.
Explicit suffixes may be used on literal variables, to change/clarify their type. See [[ProPgLiterals|Literals]] and [[TblVarTypes|Variable Types]] for some more information about suffixes that can be used on literals.
- Only valid in the //[[CompilerOptlang|-lang fb]]// dialect.
- ##[[KeyPgCommon|Common]]##
- ##[[KeyPgDim|Dim]]##
- ##[[KeyPgErase|Erase]]##
- ##[[KeyPgExtern|Extern]]##
- ##[[KeyPgLbound|LBound]]##
- ##[[KeyPgRedim|Redim]]##
- ##[[KeyPgPreserve|Preserve]]##
- ##[[KeyPgShared|Shared]]##
- ##[[KeyPgStatic|Static]]##
- ##[[KeyPgUbound|UBound]]##
Deletions:
**Var** [[[KeyPgShared shared]]] //symbolname// = //expression//[, //symbolname// = //expression//]
Note: ##[[KeyPgWstring Wstring]]## is not supported with ##**Var**##, due to the fact that there is no var-len ##[[KeyPgWstring Wstring]]## type. This isn't likely to change, due to the complexities involved with handling Unicode.
Since the type of the variable is inferred from what you assign into it, it's helpful to know how literals work. Any literal number without a decimal point defaults to ##[[KeyPgInteger Integer]]##. A literal number //with// a decimal point defaults to ##[[KeyPgDouble Double]]##. See [[ProPgLiterals]] for further information.
All ##[[KeyPgZstring Zstring]]## expressions, including string literals and dereferenced ##[[KeyPgZstring Zstring]]## ##[[KeyPgPtr Ptr]]##s, will be given the ##[[KeyPgString String]]## variable type.
Explicit suffixes may be used on literal variables, to change/clarify their type. See [[ProPgLiterals Literals]] and [[TblVarTypes Variable Types]] for some more information about suffixes that can be used on literals.
- Only valid in the //[[CompilerOptlang -lang fb]]// dialect.
- ##[[KeyPgCommon Common]]##
- ##[[KeyPgDim Dim]]##
- ##[[KeyPgErase Erase]]##
- ##[[KeyPgExtern Extern]]##
- ##[[KeyPgLbound LBound]]##
- ##[[KeyPgRedim Redim]]##
- ##[[KeyPgPreserve Preserve]]##
- ##[[KeyPgShared Shared]]##
- ##[[KeyPgStatic Static]]##
- ##[[KeyPgUbound UBound]]##


Revision [17653]

Edited on 2015-05-12 08:53:18 by FxMwikki [__Var is not available in the -lang qb dialect]
Additions:
- Only valid in the //[[CompilerOptlang -lang fb]]// dialect.
Deletions:
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Var""**##.


Revision [15961]

Edited on 2012-02-02 12:50:04 by CountingPine [Rewording, link to ProPgLiterals]
Additions:
##**Var**## declares a variable whose type is implied from the initializer expression. It is illegal to specify an explicit type in a ##**Var**## declaration. The initializer expression can be either a constant or any variable of any type.
Note: ##[[KeyPgWstring Wstring]]## is not supported with ##**Var**##, due to the fact that there is no var-len ##[[KeyPgWstring Wstring]]## type. This isn't likely to change, due to the complexities involved with handling Unicode.
Since the type of the variable is inferred from what you assign into it, it's helpful to know how literals work. Any literal number without a decimal point defaults to ##[[KeyPgInteger Integer]]##. A literal number //with// a decimal point defaults to ##[[KeyPgDouble Double]]##. See [[ProPgLiterals]] for further information.
Deletions:
##**Var**## declares a variable whose type is implied from the initializer expression. It is illegal to specify an explicit type in a ##**Var**## declaration. The initializer expression does not have to be a constant, it can be, or, it can be any variable of any type. Note: ##[[KeyPgWstring Wstring]]## is not supported with ##**Var**##, due to the fact that there is no var-len ##[[KeyPgWstring Wstring]]## type. This isn't likely to change, due to the complexities involved with handling Unicode.
Since the type of the variable is inferred from what you assign into it, it's helpful to know how literals work. Any literal number without a decimal point defaults to ##[[KeyPgInteger Integer]]##. A literal number //with// a decimal point defaults to ##[[KeyPgDouble Double]]##.


Revision [15043]

Edited on 2011-03-04 08:02:21 by CountingPine [Replace confusing/false paragraph]
Additions:
All ##[[KeyPgZstring Zstring]]## expressions, including string literals and dereferenced ##[[KeyPgZstring Zstring]]## ##[[KeyPgPtr Ptr]]##s, will be given the ##[[KeyPgString String]]## variable type.
Deletions:
All literal strings default to the type 'zstring', however, if you initialize a variable using ##[[KeyPgWstring Wstring]]##, and a literal string, the variable will be "promoted" to a variable length string.


Revision [14465]

Edited on 2009-08-29 21:57:39 by CountingPine [Remove CamelCase links in "New to FreeBASIC"]
Additions:
- New to ""FreeBASIC"" 0.17
Deletions:
- New to FreeBASIC 0.17


Revision [13252]

The oldest known version of this page was created on 2008-04-26 11:11:24 by JeffMarshall [Remove CamelCase links in "New to FreeBASIC"]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode