Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   What does this mean? (http://www.chiefdelphi.com/forums/showthread.php?t=33428)

schenkin 26-01-2005 08:05

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

Mike Betts 26-01-2005 08:50

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.

deh03766 26-01-2005 10:35

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

schenkin 27-01-2005 07:55

Re: What does this mean?
 
Thanks everyone!


All times are GMT -5. The time now is 08:18.

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