Hex Editor
Hex Editor - Binary File Editing Software for Windows

?: Conditional Operator

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >

This is the only supported ternary operator. It evaluates to the value of its second operand if the first operand evaluates to non-zero value, otherwise, it evaluates to the value of the third operand.

Syntax:

exp1 ? exp2 : exp3
      

Usage:

5 == 3 ? 8 : 7               // evaluates to 7
2 == 2 ? 8 : 7               // evaluates to 8
      
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.