Re: Errors in function trim() (ESL0.01)
- Posted by don cole <doncole at pacbell.net> Mar 29, 2006
- 468 views
I made a mistake on my last post on this subject.
global function trim(object line)-- In case a decimal is sent the error will not show up in the -- .e where trim() is kept (which is not causing the problem -- anyway) if sequence(line) and length(line)>0 then -- eniminates sending in nothing -- in any case whatever is sent in is returned*, while find(line[1], " \t\n") do line = line[2..length(line)] -- delete any leading whitespace if length(line) = 0 then --if there is nothing but spaces get out exit end if end while end if if sequence(line) and length(line)>0 then while find(line[length(line)], " \t\n") do line = line[1..length(line)-1] -- delete trailing whitespace end while end if return line -- *here end function
Don Cole