Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic Question

 
don cline
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very basic question about syntax, embarrassed to ask, but I forget
the answer, and don't have my references here. I believe this is
a question fitting for this forum.
Consider the following code fragment:


This can be accomplished in a single line, something like:

Can someone help me?

Thanx
Don
 
chi Lin
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use the ? : operator.
[ June 26, 2004: Message edited by: chi Lin ]
 
Greg T Robertson
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be more precise it's
 
don cline
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic