Please enable JavaScript to view this site.

A-Shell Reference

Updated July 2016; see History

ASB supports the data types shown in the tables below.

Scalar Types

Type

Code

Description

Floating Point

F,4

32 bit IEEE float

F,6

48 bit AMOS float

F,8

64 bit IEEE float

Binary, little endian

B,1

8 bit unsigned

B,2

16 bit unsigned

B,3

24 bit unsigned

B,4

32 bit unsigned

B,5

40 bit signed (two's complement)

B,6

48 bit unsigned

I,6

48 bit signed (two's complement)

Integer

I,1

8 bit signed (two’s complement)

I,2

16 bit signed (two’s complement, little-endian)

I,4

32 bit signed (two’s complement, 2301 order)

String

S,#

fixed length string of # bytes

S,0

variable length string (dynamically sized, always with trailing null)

Unformatted
(raw bytes)

X,#

fixed length raw bytes

(none)

May be declared implicitly by leaving type,size specifier in MAP statement blank and defining lower-level MAP Statements.

 

Compound or Structure Types

Type

Example

See Note #

Multi-level MAPs

MAP1 CUST
   MAP2 NAME,S,30
   MAP2 CUSNO,B,4
   MAP2 TOTSALES,F,6

READ #CH, CUST       ! read/write entire group as a unit

? NAME               ! individual fields referenced by name

1, 2

DEFSTRUCT

DEFSTRUCT ST_CUST    ! define structure layout
   MAP2 NAME,S,30
   MAP2 CUSNO,B,4
   MAP2 TOTSALES,F,6
ENDSTRUCT
...
MAP1 CUSREC,ST_CUST  ! define instance of structure
...
READ #CH, CUSREC     ! read/write entire struct at once
? CUSREC.NAME        ! use structvar.member notation for fields

 

DYNSTRUCT

MAP1 DS, DYNSTRUCT

 

 

Table Notes:

1Also known as "records", the multi-level MAP arrangement is physically equivalent a DEFSTRUCT, except for the syntax of accessing its members. Programmers are encouraged to use DEFSTRUCT as it makes the code more self-documenting and simplifies creating multiple instances and arrays of the layout.
2Any MAPn level with higher-numbered levels defined within it

See Also

History

2016 June, A-Shell 6.3.1516, compiler edit 763:  Added variable types B6 and I6. See following topic.

Subtopics

B6 and I6 Variables

String Variables

Boolean