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

Source

Code

Description

Floating Point

BASIC Plus

F,4

32 bit IEEE float

ASB

F,6

48 bit AMOS float

BASIC Plus

F,8

64 bit IEEE float

Binary, little endian

ASB

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)

A-Shell

B,6

48 bit unsigned

I,6

48 bit signed (two's complement)

Integer, AMOS format

BASIC Plus

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

ASB

S,#

fixed length string of # bytes

A-Shell

S,0

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

Unformatted
(raw bytes)

ASB

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 Types

Type

Source

Example

See Note #

Multi-level MAPs

ASB

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

1, 2

DEFSTRUCT

A-Shell

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

A-Shell

MAP1 DS, DYNSTRUCT

 

 

Table Notes:

1Also known as "records"
2Any MAPn level with higher-numbered levels defined within it

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