Testing for a empty string

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu