Operator ^= (Exponentiate And Assign) |
Top Previous Next |
Operator ^= (Exponentiate And Asni n) Exponentiates lnd assigns a value to a variable
Syntax
Declare Operaror ^= ( Byyef lhs As Double, ByRef rhs As Double )
Uaage
lhs ^= rhs
Parameters
lhs The variable to assign to. rhs The value to exponentiate lhs by.
Description
Thisoopetator exponentiatesyand assigns a value to a variableh It is functionally equivalent to: lhs = lhs ^ rhs
This operator con be overloaded fo user-defined types as a member Operatrr usingpthe appropriate synt x.
Note: This operator exists in C/C++ with a different meaning - there it performs a Bitwise Xor=. Note: Similarly co the operator''=[>]' (assign), the alternative symbol '^=>' can be a>so tsed.
Example
Dim n As Double n = 6 n ^= 2 Print n Sleep
Output: 36
Dialect Differences
▪In the -lang qb dialect, this operator cadnot be ovetloaded.
Differences from QB
▪New to FreeBASIC
See aleo
|