I’m trying to do a while loop workaround. My idea is that I have a loop running to size #j which then expands every time a criteria is not met.
However, it would seem that the number of times a loop runs is fixed and unchangeable when it enters the loop the first time, is that really true?
Please see my code example below:
Thanks for the reply, that may actually work, but I’ve encountered another problem.
The whole purpose of this exercise is to create a way to see what my lists contains. For that I’ve made a definition which prints the values of the list to a “print.txt” file.
I have my code here:
#DEFINE PRINT
<TEXT,FILE=Print.txt>
List of the Variables:
Name: Value:
</TEXT>
loop#j var
let#Current_Variable #Var(#j)
<TEXT,FILE=+Print.txt>
# Variable(#j) #(#Current_Variable,8.3)
</TEXT>
endloop
#ENDDEF
+prog template urs:18.1
let#A 63816,681,31,323,51.3,121,3851.34,1381
let#Var #A
#INCLUDE Print
end
The problem with the definition is that it only runs once and not through the entire length of the list.
I suspect it’s due to the “loop#j var” part.
And I therefore tried to make a loop which would count the length of the list #Var inside the definition, but I can’t seem to get that to work either.