Arm VERSION 1.2 Manual do Utilizador Página 288

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 360
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 287
Directives Reference
7-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
7.2.2 LCLA, LCLL, and LCLS
The
LCLA
directive declares a local arithmetic variable, and initializes its value to 0.
The
LCLL
directive declares a local logical variable, and initializes its value to
{FALSE}
.
The
LCLS
directive declares a local string variable, and initializes its value to a null
string,
""
.
Syntax
<lclx> variable
where:
<lclx>
is one of
LCLA
,
LCLL
, or
LCLS
.
variable
is the name of the variable.
variable
must be unique within the macro that
contains it.
Usage
Using one of these directives for a variable that is already defined re-initializes the
variable to the same values given above.
The scope of the variable is limited to a particular instantiation of the macro that
contains it (see MACRO and MEND on page 7-27).
Set the value of the variable with a
SETA
,
SETL
, or
SETS
directive (see SETA, SETL, and
SETS on page 7-7).
See GBLA, GBLL, and GBLS on page 7-4 for information on declaring global variables.
Example
MACRO ; Declare a macro
$label message $a ; Macro prototype line
LCLS err ; Declare local string
; variable err.
err SETS "error no: " ; Set value of err
$label ; code
INFO 0, "err":CC::STR:$a ; Use string
MEND
Vista de página 287
1 2 ... 283 284 285 286 287 288 289 290 291 292 293 ... 359 360

Comentários a estes Manuais

Sem comentários