Testing for a empty string
- Posted by Rich Klender <rklender at excite.com> Jan 12, 2007
- 525 views
I finally got my function to run with no errors (yeah!) but I think I'm still doing something wrong. My code: for i = 1 to Lines do -- Begin a loop that reads in each line from the text file --then, if strings[i] does not equal ; (a comment line) or --"" (a blank line), it appends the data into the sequence --DataRead strings[i] = gets(FileName) if strings[i][1] != {";"} or {" "} then DataRead = append ({}, strings[i]) end if end for I want to test the 1st character of the line I received from the gets to see if it's a semicolon or empty, if it is I don't want that line, if not then I want to append it to DataRead. Is the above correct? Thanks! Rich