View Single Post
  #5   Spotlight this post!  
Unread 04-04-2004, 21:51
piotrm's Avatar
piotrm piotrm is offline
Registered User
AKA: Piotr Mardziel
FRC #0190 (Gompei and the HERD)
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2001
Location: Dudley, MA
Posts: 96
piotrm has a spectacular aura aboutpiotrm has a spectacular aura about
Send a message via AIM to piotrm
Re: Do you use ternary operators in your code?

note: I do not do any robot programming so I assume "your code" here means just any code at all.


Things begin looking even more usefull with things like this:

Code:
(c ? a : b) = d;
I didn't really use this operator much until I had to learn scheme for school once. Afterwards I was really annoyed that some things are much easier to do in functional programming but are harder in languages like C. As suggested by rbayer, this operator gives one a slight taste of a functional programming in some cases.