Task

Demonstrate a language's methods of:

   variable declaration
   initialization
   assignment
   datatypes
   scope 
   referencing,     and 
   other variable related facilities


;
;       Variables examples for DBL version 4 by Dario B.
;
 
.DEFINE NR,10           ;const
.DEFINE AP,"PIPPO"      ;const
 
 
        RECORD CUSTOM
COD,    D5
NAME,   A80
ZIP,    D6
CITY,   A80
;-----------------------
 
        RECORD
 
ALPHA,  A5             ;alphanumeric
NUMBR,  D5             ;number
DECML,  F5.2           ;float
NUMVE,  10D5           ;array of number
NUMAR,  [10,2]D5       ;array of number
ALPV1,  10A8           ;array of alphanumeric
ALPV2,  [NR]A8         ;array of alphanumeric
ALPA1,  [10,2]A8       ;array of alphanumeric 
 
NUMV,   3D3,100,200,300
ALPV,   2A3,'ABC','FGH','KLM'
MSX,    A9,"VARIABLES"
MSG,    A*,'Esempio di variabile autodimensionante'
 
        PROC
;-----------------------------------------------------------------------
 
     CLEAR ALPHA,NUMBR,DEML,NUMVE(1:10*5),NUMAR(1:10*2*5),ALPV1(1:10*8)
     CLEAR ALPV2(1:10*8),ALPA1(1:10*2*8)
 
     ALPHA="PIPPO"
     NUMBR=10
     DECML=20.55
 
     CLEAR CUSTOM
     COD=1050
     NAME='Dario Benenati'
     ZIP=27100
     CITY="PAVIA"
 
     NUMVE(1:10*5)=
     NUMVE(1)=1
     SET NUMVE(2),NUMVE(3),NUMVE(4)=2
 
     NUMAR(1:10*2*5)=
     NUMAR[1,1]=11
     NUMAR[1,2]=12
     NUMAR[2,1]=21
     NUMAR[2,2]=22
 
     ALPV1(1:10*8)=
     ALPV1(1)="PIPPO"
     APLV1(2)="PLUTO"
     APLV1(2)="ABCDEFGHIJKLMNOP"       ;ALPV(3)='IJKLMNOP'
 
     ALPV2(1:10*8)="                   "
     ALPV2[1]="PIPPO"
     ALPV2(2)="PLUTO"
     ALPV2[3](3:2)="FO"
     ALPV2[4](3,4)="FO"
 
     SET ALPA1[1,1],ALPA1[1,2]="PLUTO"
     ALPA1[2,1](3:2)="FO"
     ALPA1[2,1](3,4)="FO"
     ;.....................
 