Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Operator??

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Does anybody know if there is a VBScript equivalent to the JavaScript conditional operator ( i.e. ?: )

e.g. max = a > b ? a : b Mise Le Meas,

Mighty :)
 
if a > b then
a
else
b
end if

I don't think there's a shortcut like there is in javascript, java, and c++... i haven't seen anything like it in regular vb, either.

:-(
penny.gif
penny.gif
 
link9,

Obviously, I know that I could just use if...then...else but the conditional operator is just so handy and would be very useful for what I am trying to do.

Thanks anyway. Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top