Repeat until (0r "while") not working

Sivakatirswami katir at hindu.org
Tue Aug 9 21:17:47 EDT 2005


I'm missing something very simple here,

Goal: delete empty lines beginning and end of text chunk

---------------

put fld "transcript" into tFinalTranscript

# clean up extra lines at beginning and end

repeat while ((line 1 of tFinalTranscript) is empty)
   delete line 1 of tFinalTranscript
end repeat

repeat until ((the last line of tFinalTranscript) is not empty)
   delete the last line of  tFinalTranscript
end repeat

put tFinalTranscript
exit to top
------------
It still has all the empty lines top and bottom. If I globalize the  
temp variable for a bit, then test the field or the variable from the  
msg box:

"line 1 of tFinalTranscript is empty"  returns true
"the last line of fld "transcript" is empty" returns true

But these handlers are not deleting the blank lines as expected..  
what am I doing wrong? I don't think I need all those parentheses...  
only added to try to get it to work... still doesn't

TIA
Sivakatirswami






More information about the use-livecode mailing list