ABSTRACT

GPSS/H actually allows for two other types of these ampervariables, but in our work, only integer, real, and character ampervariables will be used. You can use subscripted variables in ampervariables such as

REAL &X(50),&BINS(30) REAL &XX(4,4),&YYY(12,12)

The names of the ampervariables may be up to eight alphanumeric characters in length. Thus,

(a)INTEGER &I,&JOE,&K123456,&JJJ,&XYZ (b)REAL &ZX,&KLMN,&TRUCKS, &SPEED (c)CHAR*1 &ANS,&MYNAME

(a) would define integer ampervariables I, JOE, K123456, JJJ, and XYZ; (b) would define real ampervariables ZX, KLMN, TRUCKS, and SPEED; and (c) would define two character ampervariables ANS and MYNAME. Each would be one character long. In the event that one tried to define a character ampervariable that is more than one character in length, only the first character would be taken. How to give values to ampervariables is covered in the next section. In the main program Blocks, it is then possible to have the following Blocks:

QUEUE &I ADVANCE &SPEED GENERATE &JJJ SEIZE &JOE

Integer ampervariables are commonly used in connection with the GPSS/H DO LOOP, which is covered shortly.