Home › Forums › Problems and solutions in GDL › GDL add-ons › Possible to use data from external text file as parameters? › Reply To: Possible to use data from external text file as parameters?
April 19, 2018 at 08:01
#4004
Péter Baksa
Keymaster
Hi,
the example is just a small modification of your code:
DIM sarray[]
var = ""
filename = "ProjectNotes.txt"
ch1 = OPEN ("text", filename, "MODE=RO, LIBRARY")
j = 1
sarray[j]=""
repeat
n = INPUT (ch1, j, 1, var)
pos = STRSTR (var, "EF-25")
sarray[j] = var
j = j + 1
until pos = 1
CLOSE ch1
VALUES "refnote" sarray
I haven’t tested it, I guess it should work 🙂
The easiest way to debug GDL when you don’t know what is happening is to use PRINT commands. Or, you can use BREAKPOINT with the debugger, as explained here.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE