Symbols

The symbols below serve one or more special purposes in Spin code. For Propeller Assembly symbols, see Symbols, page . Each symbol's purpose is described briefly with references to other sections that describe it directly or use it in examples.

Symbol

Purpose(s)

%

Binary indicator: used to indicate that a value is being expressed in binary (base 2). See Value Representations.

%%

Quaternary indicator: used to indicate a value is being expressed in quaternary (base 4). See Value Representations.

$

Hexadecimal indicator: used to indicate a value is being expressed in hexadecimal (base 16). See Value Representations.

"

String designator: used to begin and end a string of text characters. Usually used in Object blocks, Data blocks, or in Public / Private blocks with the STRING directive.

@

Symbol Address Indicator: used immediately before a symbol to indicate the address of that symbol is to be used, rather than the value at that symbol's location. See Address Symbol '@'.

@@

Object Address Plus Symbol Indicator: used immediately before a symbol to indicate the value of that symbol should be added to the object's base address. See Object Address Plus Symbol '@@'.

_

  1. Delimiter: used as a group delimiter in constant values (where a comma ',' or period '.' may normally be used as a number group delimiter). See Value Representations.
  2. Underscore: used as part of a symbol. See Symbol Rules.

#

  1. Object-Constant reference: used to reference a sub-object's constants. See Scope of Constants, and OBJ.
  2. Enumeration Set: used in a CON block to set the start of an enumerated set of symbols. See Enumerations (Syntax 2 and 3).

.

  1. Object-Method reference: used to reference a sub-object's methods. See OBJ.
  2. Decimal point: used in floating-point constant expressions. See CON.

..

Range indicator: indicates a range from one expression to another for CASE statements or an I/O register index. See OUTA, OUTB, INA, INB, and DIRA, DIRB.

:

  1. Return value separator: appears immediately before a symbolic return value on a PUB or PRI declaration. See PUB, PRI, and RESULT.
  2. Object assignment: appears in an object reference declaration in an OBJ block. See OBJ.
  3. Case statement separator: appears immediately after the match expressions in a CASE structure. See CASE.
|
  1. Local variable separator: appears immediately before a list of local variables on a PUB or PRI declaration. See PUB and PRI.
  2. Bitwise OR: used in expressions. See Bitwise OR '|', '|='.

**

Abort trap: appears immediately before a method call that could potentially abort. See ABORT.

,

List delimiter: used to separate items in lists. See LOOKUP, LOOKUPZ, LOOKDOWN, LOOKDOWNZ, and Declaring Data (Syntax 1).

( )

Parameter list designators: used to surround method parameters. See PUB and PRI.

[ ]

Array index designators: used to surround indexes on variable arrays or main memory references. See VAR, BYTE, WORD, and LONG.

'

Code comment designator: used to enter single-line code comments (non-compiled text) for code viewing purposes. See "Using the Propeller Tool" in the software's Help file.

''

Document comment designator: used to enter single-line document comments (non-compiled text) for documentation viewing purposes. See "Using the Propeller Tool" in the software's Help file.

{ }

In-line/multi-line code comment designators: used to enter multi-line code comments (non-compiled text) for code viewing purposes.

{{ }}In-line/multi-line document comment designators: used to enter multi-line document comments (non-compiled text) for documentation viewing purposes. See "Using the Propeller Tool" in the software's Help file.

 

 

Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.