Go to Post Some things can only be revealed by time. - ChrisH [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2005, 08:05
schenkin schenkin is offline
Registered User
#0486
 
Join Date: Jan 2005
Location: Strath Haven High School
Posts: 17
schenkin is on a distinguished road
What does this mean?

I found this line in the default camera code, and I can't figure out what it means:

Pwm1_red ^= 1;

it sort of looks like early pascal, in which case it would just set the variable Pwm1_red to 1, but elsewhere in the code the more traditional "=" is used.

Anyone know what this means?

--Sam
--Team 486
--Positronic Panthers
  #2   Spotlight this post!  
Unread 26-01-2005, 08:50
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: What does this mean?

Quote:
Originally Posted by schenkin
I found this line in the default camera code, and I can't figure out what it means:

Pwm1_red ^= 1;

it sort of looks like early pascal, in which case it would just set the variable Pwm1_red to 1, but elsewhere in the code the more traditional "=" is used.

Anyone know what this means?

--Sam
--Team 486
--Positronic Panthers
Please search this document and you should find the information you are seeking now and are likely to seek in the near future.
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #3   Spotlight this post!  
Unread 26-01-2005, 10:35
deh03766 deh03766 is offline
Registered User
#0095 (LRT-Upper Valley Robotics)
 
Join Date: Feb 2002
Location: Lebanon, NH
Posts: 1
deh03766 is an unknown quantity at this point
Re: What does this mean?

[quote=schenkin]I found this line in the default camera code, and I can't figure out what it means:

Pwm1_red ^= 1;

This expands to Pwm1_red = Pwm1_red ^ 1;

^ is the xor operator, and like other operators, can be combined with = to give the shorthand statement that confused you
  #4   Spotlight this post!  
Unread 27-01-2005, 07:55
schenkin schenkin is offline
Registered User
#0486
 
Join Date: Jan 2005
Location: Strath Haven High School
Posts: 17
schenkin is on a distinguished road
Re: What does this mean?

Thanks everyone!
Closed Thread


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 18:13.

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