Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml


Functions for Working with Variables: ADD, SUB

c



+ Font mai mare | - Font mai mic



Functions for Working with Variables

ADD

Summing up a variable with the specified value and further recording the result into the variable. Calling the function ADD ( @A , @B ) is equivalent to the mathematical operation A=A+B



Syntax:

ADD ( <VariableName> <VariableName2> || <Value>

< VariableName > - variable to be set to the value

< VariableName2 > - variable, which is summed up with < VariableName >

<Value> - value, which is summed up with < VariableName >

Example:

[Trigger]

Set @num = 250

ADD ( @num , 5 )

// As a result, the variable @num = 255

Halt

[Trigger]

Set @num = 250

Set @num_1 = 50

ADD ( @num , @num_1 )

// As a result, the variable @num = 300

Halt

SUB

Subtracting the specified value from a variable's value and further recording the result into the variable. Calling the function SUB ( @A , @B ) is equivalent to the mathematical operation A=A-B

Syntax:

SUB ( <VariableName> <VariableName2> || <Value>

<Variable> - variable to be set to the value

<Value> - value to be set to the variable

Example:

[Trigger]

Set @num = 250

SUB ( @num , 5 )

// As a result, the variable @num = 245

Halt

[Trigger]

Set @num = 250

Set @num_1 = 50

SUB ( @num , @num_1 )

// As a result, the variable @num = 200

Halt

DIV

Dividing a variable's value by the specified value and further recording the result into the variable. Calling the function DIV ( @A , @B ) is equivalent to the mathematical operation A=A/B

Syntax:

DIV ( <VariableName> <VariableName2> || <Value>

<Variable> - variable to be set to the value

<Value> - value to be set to the variable

Example:

[Trigger]

Set @num = 250

DIV ( @num , 5 )

// As a result, the variable @num = 50

Halt

MUL

Multiplying a variable's value by the specified value and further recording the result into the variable. Calling the function MUL ( @A , @B ) is equivalent to the mathematical operation A=A*B

Syntax:

MUL ( <VariableName> <VariableName2> || <Value>

<Variable> - variable to be set to the value

<Value> - value to be set to the variable

Example:

[Trigger]

Set @num = 5

MUL ( @num , 5 )

// As a result, the variable @num = 25

Halt

Rnd

Returns a random number within the range of [0.100].

Syntax:

RND ( )

Example:

[Trigger]

Set @num = RND ( )

Halt



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 830
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved