Go to Post Canada has five regional events now. Canada. - Nick Lawrence [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 17-02-2003, 01:47
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by Justin Stiltner
umm... im using &, and ~= and their working just fine in my code...
and they are used in the default code from I.F.
~= is not valid syntax. The editor complains about it and won't even tokenize. It also is not any of the four default codes, so I'm not sure where you saw it. As for &, it is not the correct operator to use here. Here's a quote straight from the Stamp Manual (page 153):
Quote:
The easiest way to avoid the kinds of problems this might cause is to always use a conditional operator with IF...THEN. Change the example above to read IF Flag = 1 THEN IsTrue. The result of the comparison will follow IF...THEN rules. Also, the logical operators will work as they should; IF NOT Flag = 1 THEN IsTrue will correctly evaluate to false when Flag contains 1.
This also means that you should only use the "named" conditional logic operators NOT, AND, OR, and XOR with IF...THEN. The conditional logic operators format their results correctly for IF...THEN instructions. The other logical operators, represented by symbols ~ & | and ^ do not; they are binary logic operators.
Finally, see any of the below threads for more info:

http://www.chiefdelphi.com/forums/sh...threadid=18007
http://www.chiefdelphi.com/forums/sh...hlight=bitwise
http://www.chiefdelphi.com/forums/sh...hlight=bitwise
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:05.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi