Rockwell-automation 1771-DB BASIC MODULE Manuel d'utilisateur Page 171

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 394
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 170
Chapter
Statements
1
1
11 -19
Use the LET statement to assign a variable to the value of an expression.
The = sign used in the LET statement is not an equality operator. It is a
replacement operator. The statement should be read var is replaced expr.
The word LET is always optional (ex.
LET A = 2
is the same as A
= 2
).
When LET is omitted the LET statement is called an IMPLIED LET.
We use the word LET to refer to both the LET statement and the IMPLIED
LET statement.
Also use the LET statement to assign string variables:
LET
$(1)=“THIS IS A STRING”
or
LET $(2)=$(1)
Before you can assign strings you must execute the STRING expr, expr
statement (page 11 -37) or else a memory allocation error occurs that
causes the module to enter the Command mode.
Syntax
LET
var
=
expr
Example
>
1 REM EXAMPLE PROGRAM
>
10 LET A = 10*SIN(C)/100
>
20 LET B = B +1
LET
Vue de la page 170
1 2 ... 166 167 168 169 170 171 172 173 174 175 176 ... 393 394

Commentaires sur ces manuels

Pas de commentaire