Computer Science Canada

Boolean Errors?

Author:  TheZsterBunny [ Tue Feb 17, 2004 10:07 am ]
Post subject:  Boolean Errors?

I am trying to check for the properties of a letter, but I am getting the same error every time.

Operands of boolean operators must be boolean

What does this mean? I don't think that I've done anything wrong.

if strintok (textproc) = false then
if textproc => chr (65) and textproc <= chr (90) then
textproc := chr (ord (textproc) + 32)
elsif textproc => chr (97) and textproc <= chr (122) then
textproc := chr (ord (textproc) - 32)
end if
put : fileclose, textproc ..
end if

These red lines are where the program crashes. textproc is a one-letter string, built from a variable called inputted, which is just a string.

Any help would be appreciated, this means you Mr.Mackenzie

-z0rQ

Author:  Zorg [ Tue Feb 17, 2004 10:25 am ]
Post subject: 

i think you made a mistake by putting = before >

if strintok (textproc) = false then
if textproc >= chr (65) and textproc <= chr (90) then
textproc := chr (ord (textproc) + 32)
elsif textproc >= chr (97) and textproc <= chr (122) then
textproc := chr (ord (textproc) - 32)
end if
put : fileclose, textproc ..

Author:  TheZsterBunny [ Tue Feb 17, 2004 12:59 pm ]
Post subject: 

thanks. that works fine.

I wonder why the auto-indent didn't pick that up...

-z0rQ

Author:  Cervantes [ Tue Feb 17, 2004 3:55 pm ]
Post subject: 

that's a syntax error, the same as spelling Draw.FillOval, "Draw.filloval". Indent doesn't pick that stuff up, just indents it Smile If F2 picked that up it would be like a spell check Very Happy

Author:  TheZsterBunny [ Wed Feb 18, 2004 12:35 pm ]
Post subject: 

reminds me of actionscript. the differences between gotoandplay(#); and gotoAndPlay(#);. *sigh* you would think that greater-than-or-equal-to and equal-to-or-greater-than were the same.


: