Help please
- Posted by johnrpm Feb 20, 2012
- 1187 views
I have a text file with a number on each line, at certain points in the file, (end of image width) I have a character R, I want to find this character in insert printhead offsets, the code below may explain.
file_numR= open("c:/red.jet", "r") file_numR2= open("c:/red2.jet","w") trace(1) lineR = gets(file_numR) for t = 0 to incR do i = equal(lineR,['R']) while i = 0 do -------- 1 true 0 false puts(file_numR2, (lineR)) lineR = gets(file_numR) i = equal(lineR[1],'R') end while a1 = where(file_numR2) i2 = a1-2 i1 = seek(file_numR2,i2) for R = 0 to TotalOffset do puts(file_numR2, '\n') puts(file_numR2, "0.xxx") -- insert test value end for lineR = gets(file_numR) puts(file_numR2, '\n') end for close(file_numR) close(file_numR2)
But I get this error message..... attempt to subscript an atom (reading from it)
Can anyone tell me what I am doing wrong, please keep it simple, i'm not very bright.