Revision history for KeyPgOpAssignment


Revision [21619]

Last edited on 2016-10-30 17:01:34 by fxm [Formatting]
Additions:


Revision [21373]

Edited on 2016-04-15 08:24:41 by fxm [Added link to 'Coercion and Conversion']
Additions:
- [[ProPgDataConversion|Coercion and Conversion]]


Revision [21348]

Edited on 2016-04-15 03:41:24 by fxm [Added reference to KeyPgOperator for appropriate syntax when overloaded as member operator]
Additions:
This operator can be overloaded for user-defined types as a member ##[[KeyPgOperator|Operator]]## using the appropriate syntax.
Deletions:
This operator can be overloaded for user-defined types.


Revision [21001]

Edited on 2016-03-13 05:06:59 by fxm [Formatting]
Additions:



Revision [20351]

Edited on 2016-02-10 16:03:37 by DkLwikki [Update link format]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **Let** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] //T1//, [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] //T2// )
[ [[KeyPgLet|Let]] ] //lhs// **=** //rhs//
[ [[KeyPgLet|Let]] ] //lhs// **=>** //rhs// (from fbc version 0.90)
This operator assigns the value of its right-hand side operand (##//rhs//##) to its left-hand side operand (##//lhs//##). The right-hand side operand must be implicitly convertible to the left-hand side type (##//T1//##) (for conversion of a boolean to an integer, false or true boolean value becomes 0 or -1 integer value). For example, you cannot assign a numeric value to a string type; to do that, first convert the numeric value to a string using ##[[KeyPgStr|Str]]## or ##[[KeyPgWstr|Wstr]]##.
Avoid confusion with ##[[KeyPgOpEqual|Operator = (Equal)]]##, which also uses the '##=##' symbol.
For this purpose and for solving some cases of ambiguity of the parser (see ##[[KeyPgByrefFunction|BYREF (function results)]]##), the alternative symbol '=>' can be used for assignments (in place of '=') from fbc version 0.90 (same as already for the initializers).
- In the //[[CompilerOptlang|-lang qb]]// dialect, this operator cannot be overloaded.
- In the //[[CompilerOptlang|-lang qb]]// dialect, an assignment expression can be preceded by the ##[[KeyPgLet|Let]]## keyword.
- ##[[KeyPgOpEqual|Operator = (Equal)]]##
- ##[[KeyPgOpLet|Operator Let (Assignment)]]##
- ##[[KeyPgSwap|Swap]]##
Deletions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Let** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T1//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T2// )
[ [[KeyPgLet Let]] ] //lhs// **=** //rhs//
[ [[KeyPgLet Let]] ] //lhs// **=>** //rhs// (from fbc version 0.90)
This operator assigns the value of its right-hand side operand (##//rhs//##) to its left-hand side operand (##//lhs//##). The right-hand side operand must be implicitly convertible to the left-hand side type (##//T1//##) (for conversion of a boolean to an integer, false or true boolean value becomes 0 or -1 integer value). For example, you cannot assign a numeric value to a string type; to do that, first convert the numeric value to a string using ##[[KeyPgStr Str]]## or ##[[KeyPgWstr Wstr]]##.
Avoid confusion with ##[[KeyPgOpEqual Operator = (Equal)]]##, which also uses the '##=##' symbol.
For this purpose and for solving some cases of ambiguity of the parser (see ##[[KeyPgByrefFunction BYREF (function results)]]##), the alternative symbol '=>' can be used for assignments (in place of '=') from fbc version 0.90 (same as already for the initializers).
- In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded.
- In the //[[CompilerOptlang -lang qb]]// dialect, an assignment expression can be preceded by the ##[[KeyPgLet Let]]## keyword.
- ##[[KeyPgOpEqual Operator = (Equal)]]##
- ##[[KeyPgOpLet Operator Let (Assignment)]]##
- ##[[KeyPgSwap Swap]]##


Revision [17815]

Edited on 2015-09-29 15:34:17 by FxMwikki ['=>' is an alternative syntax for the assignment operator]
Additions:
For this purpose and for solving some cases of ambiguity of the parser (see ##[[KeyPgByrefFunction BYREF (function results)]]##), the alternative symbol '=>' can be used for assignments (in place of '=') from fbc version 0.90 (same as already for the initializers).
Deletions:
For this purpose and for solving some cases of ambiguity of the parser (see ##[[KeyPgByrefFunction BYREF (function results)]]##), '=>' can be used for assignments (in place of '=') from fbc version 0.90 (same as already for the initializers).


Revision [17806]

Edited on 2015-09-29 14:52:43 by FxMwikki ['=>' is an alternative syntax for the assignment operator]
Additions:
{{fbdoc item="title" value="Operator =[>] (Assign)"}}----
##//or//##
//lhs// **=>** //rhs// (from fbc version 0.90)
##//or, in the //QB// dialect,//##
##//or//##
[ [[KeyPgLet Let]] ] //lhs// **=>** //rhs// (from fbc version 0.90)
Avoid confusion with ##[[KeyPgOpEqual Operator = (Equal)]]##, which also uses the '##=##' symbol.
For this purpose and for solving some cases of ambiguity of the parser (see ##[[KeyPgByrefFunction BYREF (function results)]]##), '=>' can be used for assignments (in place of '=') from fbc version 0.90 (same as already for the initializers).
//Note: the '=>' symbol has been chosen against '<=' (already the operator 'Less Than Or Equal') and ':=' (':' used as statement separator).//
Deletions:
{{fbdoc item="title" value="Operator = (Assign)"}}----
##//or, in the //QB// dialect,//##
Avoid confusion with ##[[KeyPgOpEqual Operator = (Equal)]]##, which also uses the '##=##' symbol (for that, from fbc version 0.90, '=>' can be used for assignments, in place of '=', same as for initializers).


Revision [17772]

Edited on 2015-09-12 07:15:30 by FxMwikki [Added conversion of Booleans to Integers]
Additions:
This operator assigns the value of its right-hand side operand (##//rhs//##) to its left-hand side operand (##//lhs//##). The right-hand side operand must be implicitly convertible to the left-hand side type (##//T1//##) (for conversion of a boolean to an integer, false or true boolean value becomes 0 or -1 integer value). For example, you cannot assign a numeric value to a string type; to do that, first convert the numeric value to a string using ##[[KeyPgStr Str]]## or ##[[KeyPgWstr Wstr]]##.
Deletions:
This operator assigns the value of its right-hand side operand (##//rhs//##) to its left-hand side operand (##//lhs//##). The right-hand side operand must be implicitly convertible to the left-hand side type (##//T1//##). For example, you cannot assign a numeric value to a string type; to do that, first convert the numeric value to a string using ##[[KeyPgStr Str]]## or ##[[KeyPgWstr Wstr]]##.


Revision [17752]

Edited on 2015-09-12 04:27:01 by FxMwikki [Added boolean type]
Additions:
Any numeric, boolean, string or pointer type.
Deletions:
Any numeric, string or pointer type.


Revision [17071]

Edited on 2014-05-01 02:05:21 by FxMwikki [Assignment between arrays is not supported presently]
Additions:
Assignment between arrays is not supported presently.


Revision [16928]

Edited on 2013-08-31 11:05:26 by FxMwikki ['=>' can now be used for assignments, in place of '=', same as for initializers]
Additions:
Avoid confusion with ##[[KeyPgOpEqual Operator = (Equal)]]##, which also uses the '##=##' symbol (for that, from fbc version 0.90, '=>' can be used for assignments, in place of '=', same as for initializers).
Deletions:
Avoid confusion with ##[[KeyPgOpEqual Operator = (Equal)]]##, which also uses the '##=##' symbol.


Revision [15886]

Edited on 2012-01-29 21:30:05 by CountingPine ['=>' can now be used for assignments, in place of '=', same as for initializers]
Additions:
Avoid confusion with ##[[KeyPgOpEqual Operator = (Equal)]]##, which also uses the '##=##' symbol.
Deletions:
Avoid confusion with ##[[KeyPgOpEqual Operator = (Equal)]]##, which also uses the '=' symbol.


Revision [14528]

Edited on 2009-11-07 22:57:38 by CountingPine ['=>' can now be used for assignments, in place of '=', same as for initializers]
Additions:
- ##[[KeyPgSwap Swap]]##
Deletions:
- ##[[KeyPgSwap Swap]]**


Revision [14511]

Edited on 2009-11-05 23:10:41 by DoS386 [+seelink [2]]
Additions:
{{fbdoc item="see"}}
- ##[[KeyPgSwap Swap]]**
Deletions:
{{fbdoc item="see"}}
- ##[[KeyPgSwap]]**


Revision [14509]

Edited on 2009-11-05 23:08:24 by DoS386 [+seelink]
Additions:
- ##[[KeyPgSwap]]**


Revision [13553]

Edited on 2008-07-21 15:43:20 by JeffMarshall [added #lang or $lang to example]
Additions:
#lang "fblite"
Dim i As Integer
Let i = 300 ' <-alternate syntax
Deletions:
LET i = 300 ' <-alternate syntax


Revision [12862]

The oldest known version of this page was created on 2008-04-01 16:21:13 by JeffMarshall [added #lang or $lang to example]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode