Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Boolean Errors?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TheZsterBunny




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Zorg




PostPosted: Tue Feb 17, 2004 10:25 am   Post subject: (No 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 ..
TheZsterBunny




PostPosted: Tue Feb 17, 2004 12:59 pm   Post subject: (No subject)

thanks. that works fine.

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

-z0rQ
Cervantes




PostPosted: Tue Feb 17, 2004 3:55 pm   Post subject: (No 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
TheZsterBunny




PostPosted: Wed Feb 18, 2004 12:35 pm   Post subject: (No 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: