Please enable JavaScript to view this site.

Validity: Rule, Task

Allows a variable to be assigned the value of a constant, either a variable or an expression.

Syntax

var = valueS

var = varS

var

Destination variable

valueS

Constant value or source expression

varS

Source variable

NOTE: Assigning to an integer variable a real value, it will result in truncation of the decimal part; if the value is too large to be represented in the integer variable, the result will be unpredictable.

Examples:

; The register r(100) will contain the value of the product 17*3

; minus the value of the variable value1

r(100) = 17 * 3 - value1

; The variable value2 will take the value of the contents of the register r(100)

; multiplied by the constant K_PI (Pi).

value2 = r(100) * K_PI

; The string register sr(12) will contain the string:

; This is a string..

sr(12) = "This is a string.."

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC