[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Array and define uses -Reply
Why are you putting a #DEFINE variable into the array? What is your goal
for the array? From what I can see it looks like you are trying to load the
description of the deduction code.
If you are initializing the array with particular providers:
Step1: Create the array in a procedure
begin-procedure Define-The-Array
create-array name=Provider size=16
field=Dedcd:char
field=Name:char
end-procedure
Step2: populate the array in a different procedure
begin-procedure Array-Population
put 'AET' 'AETNA' into Provider(0)
put 'EQU' 'EQUATABLE' into Provider(1)
put 'HAR' 'HARTFORD' into Provider(2)
etc...
end-procedure
This allows you the manual population of the array by adjusting the code
in a single procedure in the code. You can make this fancy by asking the
user to populate the array using the INPUT command and testing for the
user's exit.
begin-procedure Array-Population
move 0 to #arrayindex
input $Code 'Please enter the abbreviation, use Q to quit'
let $Code = upper($Code)
if $Code <> 'Q'
input $Descr 'Please enter the description'
put $Code $Descr into Provider(#arrayindex)
add 1 to #counter
end-if
end-procedure
Dave