Revision history for KeyPgScope


Revision [22060]

Last edited on 2017-12-28 00:13:18 by fxm [Wording]
Additions:
The local variables are reserved on stack at granularity level of each procedure (including the main part of the program), not at granularity level of each individual scope block. So a same memory space can be used by local variables belonging to different scope blocks.
Deletions:
The local variables are reserved on stack at granularity level of each procedure (including the main part of the program), not at granularity level of each individual scope block. So a same data address can be used for different local variables belonging to different scope blocks.


Revision [22059]

Edited on 2017-12-27 01:39:49 by fxm [Added precision on memory allocation for local variables]
Additions:
The local variables are reserved on stack at granularity level of each procedure (including the main part of the program), not at granularity level of each individual scope block. So a same data address can be used for different local variables belonging to different scope blocks.


Revision [21289]

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


Revision [21117]

Edited on 2016-03-13 10:03:08 by fxm [Formatting]

No Differences

Revision [20498]

Edited on 2016-02-10 16:08:02 by DkLwikki [Update link format]
Additions:
When a variable is (re)defined with ##[[KeyPgDim|Dim]]## within a scope structure, this local working variable can be used from its (re)definition until the end of the scope. During this time, any variables outside the scope that have the same name will be ignored, and will not be accessible by that name. Any statements in the Scope block before the variable is redefined will use the variable as defined outside the Scope.
##**Scope..End Scope**## is not permitted when compiling with in the //[[CompilerOptlang|-lang qb]]// dialect.
Dim y As Integer = 4
Print "x ="; x; ", "; "y ="; y
- Explicit ##**Scope**##..##**End Scope**## blocks are available only in the //[[CompilerOptlang|-lang fb]]// and //[[CompilerOptlang|-lang deprecated]]// dialects.
- Explicit ##**Scope**##..##**End Scope**## blocks are not available in the //[[CompilerOptlang|-lang fblite]]// and //[[CompilerOptlang|-lang qb]]// dialects.
- ##[[KeyPgDim|Dim]]##
- ##[[KeyPgRedim|Redim]]##
- ##[[KeyPgStatic|Static]]##
- ##[[KeyPgVar|Var]]##
Deletions:
When a variable is (re)defined with ##[[KeyPgDim Dim]]## within a scope structure, this local working variable can be used from its (re)definition until the end of the scope. During this time, any variables outside the scope that have the same name will be ignored, and will not be accessible by that name. Any statements in the Scope block before the variable is redefined will use the variable as defined outside the Scope.
##**Scope..End Scope**## is not permitted when compiling with in the //[[CompilerOptlang -lang qb]]// dialect.
Dim y As Integer = 4
Print "x ="; x; ", "; "y ="; y
- Explicit ##**Scope**##..##**End Scope**## blocks are available only in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang deprecated]]// dialects.
- Explicit ##**Scope**##..##**End Scope**## blocks are not available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects.
- ##[[KeyPgDim Dim]]##
- ##[[KeyPgRedim Redim]]##
- ##[[KeyPgStatic Static]]##
- ##[[KeyPgVar Var]]##


Revision [17609]

Edited on 2015-04-25 00:19:57 by FxMwikki [Formatting]
Additions:
- Explicit ##**Scope**##..##**End Scope**## blocks are available only in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang deprecated]]// dialects.
- Explicit ##**Scope**##..##**End Scope**## blocks are not available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects.
Deletions:
- Explicit SCOPE..END SCOPE blocks are available only in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang deprecated]]// dialects.
- Explicit SCOPE..END SCOPE blocks are not available in the //[[CompilerOptlang -lang fblite]]// and //[[CompilerOptlang -lang qb]]// dialects.


Revision [17604]

Edited on 2015-04-19 04:04:31 by FxMwikki [Some wordings]
Additions:
The Scope block allows variables to be (re)defined and used locally in a program.
When a variable is (re)defined with ##[[KeyPgDim Dim]]## within a scope structure, this local working variable can be used from its (re)definition until the end of the scope. During this time, any variables outside the scope that have the same name will be ignored, and will not be accessible by that name. Any statements in the Scope block before the variable is redefined will use the variable as defined outside the Scope.
Deletions:
The Scope block allows variables to be temporarily (re)defined and used in a program.
When a variable is (re)defined with ##[[KeyPgDim Dim]]## within a scope structure, that temporary variable can be used from its (re)definition until the end of the scope. During this time, any variables outside the scope that have the same name will be ignored, and will not be accessible by that name. Any statements in the Scope block before the variable is redefined will use the variable as defined outside the Scope.


Revision [17102]

Edited on 2014-06-23 08:26:10 by FxMwikki [Rewording]
Additions:
The Scope block allows variables to be temporarily (re)defined and used in a program.

When a variable is (re)defined with ##[[KeyPgDim Dim]]## within a scope structure, that temporary variable can be used from its (re)definition until the end of the scope. During this time, any variables outside the scope that have the same name will be ignored, and will not be accessible by that name. Any statements in the Scope block before the variable is redefined will use the variable as defined outside the Scope.
Deletions:
The Scope block allows variables to be temporarily (re)defined and used in a program. When a variable is defined with ##[[KeyPgDim Dim]]## within a scope structure, that variable can be used until the end of the scope. During this time, any variables outside the scope that have the same name will be ignored, and will not be accessible by that name.
Any statements in the Scope block before the variable is dimensioned will use the variable as defined outside the Scope.


Revision [16720]

Edited on 2013-04-18 03:58:13 by FxMwikki [Added links in 'See also:']
Additions:
- ##[[KeyPgRedim Redim]]##
- ##[[KeyPgStatic Static]]##
- ##[[KeyPgVar Var]]##


Revision [14436]

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


Revision [12787]

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



sf.net phatcode