First: I'm using UC4 - dialog version 9.00A Build 234-162.
I'm trying to read a variable number of input fields (via :READ) and want to store their values into an array:
:DEFINE &FILE#, string, 10
:PUBLISH &FILE#[], , "WORKFLOW"
:BEGINREAD "Files"
: READ &CNT#, , "Number of files", "3"
:ENDREAD
:SET &IDX# = 1
:BEGINREAD "Files"
: WHILE &IDX# LE &CNT#
: SET &IDX# = ADD(&IDX#, 1)
: READ &FILE#[&IDX#], ,"???"
: ENDWHILE
:ENDREAD
Problem is: Now I'm getting the error message U0020310 telling me the first parameter of :READ has to be a variable.
The Question: What am I missing? Is it impossible to use :READ with arrays? If thats the case: How can I work around that?
&CNT# has to be a Variable object (a VARA object). So you would read everything into a static VARA object.
This could than be looped through with a PREP_PROCESS command.