Re: Testing for a empty string

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

Rich Klender wrote:
> 
>         strings[i] = gets(FileName)
>         
>         if strings[i][1] != {";"} or {" "} then
>             DataRead = append ({}, strings[i])
>         end if
> 
> 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.

Try

   if strings[i][1] != ';' and strings[i][1] != ' ' then

alternatively

   if find(strings[i][1],"; ") = 0 then

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

Search



Quick Links

User menu

Not signed in.

Misc Menu