Page 1 of 1

DIM statement issues[solved]

Posted: Thu Nov 10, 2016 4:19 am
by azure8bit
Im having trouble getting my data list to print using the DIM statement. If someone could assist me or point me in the right direction. It would be appreciated.

Code: Select all


DIM Number(15), Income(15), Persons(15)
'**************************** PROGRAM MAINLINE ******************************
GOSUB InitializerPrintImages
gosub printheadings
gosub processdetail
end
'************************* INITIALIZE PRINT IMAGES **************************
InitializerPrintImages:
TITLE1$ = "ID Number      Annual Income      Number of Persons"
a1$ = "####               ######         ##               "
return
'*************************PRINT HEADINGS********************************
PrintHeadings:
print title1$
return
'******************Process Detail*********************
processdetail:

gosub loadtable
do until Number = END
    gosub displaytable
    gosub loadtable
loop
return
   
'*****************************load table*************************************8
loadtable:
for s = 1 to 14
    READ Number(s),Income(s),Persons(s)
next s
data 2497,12500,2
data 3323,13000,5
data 4521,18210,4
data 6789,8000,2
data 5476,6000,1
data 4423,16400,3
data 6587,25000,4
data 3221,10500,4
data 5555,15000,2
data 0085,19700,3
data 3097,20000,8
data 4480,23400,5
data 0265,19700,2
data 8901,13000,3
data end, end, end
return


'*********************DISPLAYTABLE**************************************
displaytable:
print using a1$;Number(s),Income(s),Persons(s)
return