#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <math.h>
#include "../command.h"
Go to the source code of this file.
Functions | |
long * | RaiseError (pExecuteObject pEo) |
DEREFERENCE (LetThisVariable) | |
if (ExpressionResult==NULL||TYPE(ExpressionResult)!=VTYPE_ARRAY) | |
if (memory_ReplaceVariable(pEo-> ArrayCopyTo==NULL) | |
if (iError) | |
while (nItem) | |
if (memory_Type(*LetThisVariable)==VTYPE_DOUBLE) | |
if (bResultIsBig||(memory_Type(Op1)==VTYPE_DOUBLE||memory_Type(Op2)==VTYPE_DOUBLE)||(memory_Type(Op1)==VTYPE_STRING &&!ISSTRINGINTEGER(Op1))||(memory_Type(Op2)==VTYPE_STRING &&!ISSTRINGINTEGER(Op2))) | |
if ((memory_Type(Op1)==VTYPE_DOUBLE||memory_Type(Op2)==VTYPE_DOUBLE)||(memory_Type(Op1)==VTYPE_STRING &&!ISSTRINGINTEGER(Op1))||(memory_Type(Op2)==VTYPE_STRING &&!ISSTRINGINTEGER(Op2))) | |
if (STRLEN(Op2)==0) | |
if LetThisVariable | memory_ReleaseVariable (pEo->pMo,*LetThisVariable) |
Variables | |
VARIABLE | ExpressionResult |
VARIABLE | ArrayCopyTo |
LEFTVALUE | LetThisVariable |
long | refcount |
LetThisVariable = EVALUATELEFTVALUE(PARAMETERNODE) | |
ASSERTOKE | |
NEXTPARAMETER | |
ExpressionResult = execute_Evaluate(pEo,PARAMETERNODE,_pThisCommandMortals,&iErrorCode,1) | |
ASSERTOKE | |
ArrayCopyTo = memory_CopyArray(pEo->pMo,ExpressionResult) | |
* | v1 = NewValue |
iError = memory_SetRef(pEo->pMo,v1,v2) | |
END NODE | nItem |
LEFTVALUE | LetThisVariable |
VARIABLE | NewValue |
unsigned long | refcount |
nItem = PARAMETERNODE | |
END VARIABLE | ExpressionResult |
VARIABLE | Op1 |
VARIABLE | Op2 |
LEFTVALUE | LetThisVariable |
long | refcount |
int | bResultIsBig |
long | Lop2 |
double | dResult |
long | lResult |
LetThisVariable = EVALUATELEFTVALUE(PARAMETERNODE) | |
ASSERTOKE | |
NEXTPARAMETER | |
Op2 = execute_Evaluate(pEo,PARAMETERNODE,_pThisCommandMortals,&iErrorCode,0) | |
ASSERTOKE | |
bResultIsBig = 0 | |
Op1 = *LetThisVariable | |
* | LetThisVariable = ExpressionResult |
END VARIABLE | ExpressionResult |
VARIABLE | Op1 |
VARIABLE | Op2 |
LEFTVALUE | LetThisVariable |
long | refcount |
int | bResultIsBig |
long | Lop2 |
double | dResult |
long | lResult |
LetThisVariable = EVALUATELEFTVALUE(PARAMETERNODE) | |
ASSERTOKE | |
NEXTPARAMETER | |
Op2 = execute_Evaluate(pEo,PARAMETERNODE,_pThisCommandMortals,&iErrorCode,0) | |
ASSERTOKE | |
bResultIsBig = 0 | |
Op1 = *LetThisVariable | |
* | LetThisVariable = ExpressionResult |
END VARIABLE | ExpressionResult |
VARIABLE | Op1 |
VARIABLE | Op2 |
LEFTVALUE | LetThisVariable |
long | refcount |
int | bResultIsBig |
long | Lop2 |
double | dResult |
long | lResult |
LetThisVariable = EVALUATELEFTVALUE(PARAMETERNODE) | |
ASSERTOKE | |
NEXTPARAMETER | |
Op2 = execute_Evaluate(pEo,PARAMETERNODE,_pThisCommandMortals,&iErrorCode,0) | |
ASSERTOKE | |
bResultIsBig = 0 | |
Op1 = *LetThisVariable | |
* | LetThisVariable = ExpressionResult |
END VARIABLE | ExpressionResult |
VARIABLE | Op1 |
VARIABLE | Op2 |
LEFTVALUE | LetThisVariable |
long | refcount |
long | lop2 |
double | dResult |
long | lResult |
LetThisVariable = EVALUATELEFTVALUE(PARAMETERNODE) | |
ASSERTOKE | |
NEXTPARAMETER | |
Op2 = execute_Evaluate(pEo,PARAMETERNODE,_pThisCommandMortals,&iErrorCode,0) | |
ASSERTOKE | |
Op1 = *LetThisVariable | |
* | LetThisVariable = ExpressionResult |
END VARIABLE | ExpressionResult |
VARIABLE | Op1 |
VARIABLE | Op2 |
LEFTVALUE | LetThisVariable |
long | refcount |
double | dResult |
long | lResult |
LetThisVariable = EVALUATELEFTVALUE(PARAMETERNODE) | |
ASSERTOKE | |
NEXTPARAMETER | |
Op2 = execute_Evaluate(pEo,PARAMETERNODE,_pThisCommandMortals,&iErrorCode,0) | |
ASSERTOKE | |
Op1 = *LetThisVariable | |
* | LetThisVariable = ExpressionResult |
END VARIABLE | ExpressionResult |
VARIABLE | Op1 |
VARIABLE | Op2 |
LEFTVALUE | LetThisVariable |
long | refcount |
LetThisVariable = EVALUATELEFTVALUE(PARAMETERNODE) | |
ASSERTOKE | |
NEXTPARAMETER | |
Op2 = execute_Evaluate(pEo,PARAMETERNODE,_pThisCommandMortals,&iErrorCode,0) | |
ASSERTOKE | |
Op1 = *LetThisVariable | |
Op1 = CONVERT2STRING(Op1) | |
Op2 = CONVERT2STRING(Op2) | |
* | LetThisVariable = ExpressionResult |
|
|
|
|
|
Definition at line 777 of file let.c. References ERROR(), NULL, pEo, and RaiseError(). |
|
Definition at line 406 of file let.c. References LONGVALUE(). |
|
Definition at line 370 of file let.c. References LONGVALUE(), memory_ReleaseVariable(), pEo, and RETURN. |
|
|
|
|
|
Definition at line 74 of file let.c. References memory_ReplaceVariable(), pEo, and RETURN. |
|
|
|
Definition at line 85 of file mathops.c. Referenced by if(). |
|
Definition at line 301 of file let.c. References ASSERTOKE, ERROR(), memory_DupImmortal(), memory_ReleaseVariable(), NULL, and pEo. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LETC =section misc =title v &= expression =display LETC Append a string to a variable. The variable can be a global or local variable, array element or associative array element. You can use this command as a shorthand for T<v = v & expression>. Using this short format is more readable in some cases and generates more efficient code. However note that this kind of assignment operation is a C language like operator and is not common in BASIC programs. |
|
LETI =section misc =title v \= expression =display LETI Integer divide a variable by a value. The variable can be a global or local variable, array element or associative array element. You can use this command as a shorthand for T<v = v \ expression>. Using this short format is more readable in some cases and generates more efficient code. However note that this kind of assignment operation is a C language like operator and is not common in BASIC programs. |
|
LETD =section misc =title v /= expression =display LETD Divide a variable by an expression. The variable can be a global or local variable, array element or associative array element. You can use this command as a shorthand for T<v = v / expression>. Using this short format is more readable in some cases and generates more efficient code. However note that this kind of assignment operation is a C language like operator and is not common in BASIC programs. |
|
LETS =section misc =title v *= expression =display LETS Multiply a variable with a value. The variable can be a global or local variable, array element or associative array element. You can use this command as a shorthand for T<v = v * expression>. Using this short format is more readable in some cases and generates more efficient code. However note that this kind of assignment operation is a C language like operator and is not common in BASIC programs. |
|
LETP =section misc =title v += expression =display LETP Add a value to a variable. The variable can be a global or local variable, array element or associative array element. You can use this command as a shorthand for T<v = v + expression>. Using this short format is more readable in some cases and generates more efficient code. However note that this kind of assignment operation is a C language like operator and is not common in BASIC programs. |
|
LETM =section misc =title v -= expression =display LETM This command subtracts a value from a variable. The variable can be a global or local variable, array element or associative array element. You can use this command as a shorthand for T<v = v - expression>. Using this short format is more readable in some cases and generates more efficient code. However note that this kind of assignment operation is a C language like operator and is not common in BASIC programs. |
|
|
|
LET =section misc =title v = expression =display LET Assign a value to a variable. On the left side of the T<=> a variable or some other ScriptBasic left value has to stand. On the right side an expression should be used. First the left value is evaluated and then the expression. Finally the left value's old value is replaced by the result of the expression. The left value standing on the left side of the T<=> can be a local or global variable, array element or associative array element. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|