12-02-2017, 12:03 AM
I'm doing a little program, but I have to deal with several different numbers of input, it will all depend on the first user input(condTot).
If the user choose 5, for example, it will ask them several questions about each one of those 5 elements.
I could do a "case/if", for each one, with a limit, but I wanted to do better.
So I did this loop, It takes the user input(condTot) and then it will create a list os inputs, asking questions about each one of those 5 elements.
But there is a problem with this aproach, when I put: L9(TEMP1,1), it will append the value of "L9(TEMP1,1)", not the adress, and then, when i call it back with the input, the value of formVar element will be like:
{0,[0]{20,20,1}} //What i get
Not:
{L9(TEMP1,1),[0]{20,20,1}} //What I want
And when it goes inside of INPUT, of course it will give me trouble...
Is there any way of avoiding that? Or is there any way to make the input do what I want?? A flexible way of doing INPUT.
The rest of the code
Thank you for reading, and I would apreciate if you could help me
If the user choose 5, for example, it will ask them several questions about each one of those 5 elements.
I could do a "case/if", for each one, with a limit, but I wanted to do better.
So I did this loop, It takes the user input(condTot) and then it will create a list os inputs, asking questions about each one of those 5 elements.
But there is a problem with this aproach, when I put: L9(TEMP1,1), it will append the value of "L9(TEMP1,1)", not the adress, and then, when i call it back with the input, the value of formVar element will be like:
{0,[0]{20,20,1}} //What i get
Not:
{L9(TEMP1,1),[0]{20,20,1}} //What I want
And when it goes inside of INPUT, of course it will give me trouble...
Is there any way of avoiding that? Or is there any way to make the input do what I want?? A flexible way of doing INPUT.
Code:
FOR TEMP0 FROM 1 TO condTot DO
TEMP1:=2+TEMP0;
formVar:=append(formVar,{{L9(TEMP1,1),[0],{20,20,1}}, {L9(TEMP1,2),[0],{70,20,1}}});
formTit:=append(formTit,{"X Cond: "+TEMP0, "Y Cond: "+TEMP0});
END;
INPUT(formVar,"TEST", formTit, "EI,EI");
The rest of the code
Thank you for reading, and I would apreciate if you could help me