View Single Post
  #2   Spotlight this post!  
Unread 16-01-2004, 13:56
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: Probably a basic question, but....

Quote:
Originally Posted by Raven_Writer
Ok, I've never known what this code actually does:

PHP Code:
/**  example only **/
   
int hi 0;
   
   return 
hi 0 0
Could someone explain that to me please?

My books don't have any explination (sp?) on that.
The ? : is called the ternary operator. It's a more compact way of doing if statements. The format is:

conditional statement ? statement executed if true : statement executed if false;

I'm assuming that extra 0 stuck in there after hi is a typo?