Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Trinary Operator Semantics

by pfaut (Priest)
on May 26, 2005 at 19:39 UTC ( #460838=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        printf("File name: %s\n", (ptr == NULL) ? "<unspecified>" : ptr);
    
  2. or download this
        char *s;
        if (ptr == NULL)
    ...
        else
            s = ptr;
        printf("File name: %s\n", s);
    
  3. or download this
    # trinary
    movl    %eax, -28(%ebp) #  to_return
    
    # ifelse
    movl    $1, -28(%ebp)   #  to_return
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://460838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2021-01-22 14:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?