IncredibleVolk
Technical User
I took this script off this site. It's logic appears correct but I'm getting a "value out of range" error. I have multiple columns I need to delimit and I wonder if it's because the total exceeds 256 characters
fopen 0 sTabName READ
while not feof 0
fgets 0 sLine
strlen sLine iLen
for iLoop = 0 upto iLen-1
strgetc sLine iLoop iChar
if iChar == 32
iFlag = 1
strputc sNewLine iPos iChar
else
if iFlag == 1
strputc sNewLine iPos 9
iPos++
strputc sNewLine iPos iChar
iFlag = 0
else
strputc sNewLine iPos iChar
endif
endif
iPos++
endfor
endwhile
fclose 0
fopen 0 sTabName READ
while not feof 0
fgets 0 sLine
strlen sLine iLen
for iLoop = 0 upto iLen-1
strgetc sLine iLoop iChar
if iChar == 32
iFlag = 1
strputc sNewLine iPos iChar
else
if iFlag == 1
strputc sNewLine iPos 9
iPos++
strputc sNewLine iPos iChar
iFlag = 0
else
strputc sNewLine iPos iChar
endif
endif
iPos++
endfor
endwhile
fclose 0