Keil Logo Arm Logo

Assembler Reference

SETA, SETL, and SETS

SETA, SETL, and SETS

The SETA directive sets the value of a local or global arithmetic variable.

The SETL directive sets the value of a local or global logical variable.

The SETS directive sets the value of a local or global string variable.

Show/hideSyntax

variable <setx> expr

where:

<setx>

is one of SETA, SETL, or SETS.

variable

is the name of a variable declared by a GBLA, GBLL, GBLS, LCLA, LCLL, or LCLS directive.

expr

is an expression that is:

  • numeric, for SETA

  • logical, for SETL

  • string, for SETS.

Show/hideUsage

You must declare variable using a global or local declaration directive before using one of these directives.

You can also predefine variable names on the command line.

Show/hideExamples

                GBLA    VersionNumber
VersionNumber   SETA    21
                GBLL    Debug
Debug           SETL    {TRUE}
                GBLS    VersionString
VersionString   SETS    "Version 1.0"
Copyright © 2011-2012 ARM. All rights reserved.ARM DUI 0588B
Non-ConfidentialID062912

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.