Ternary endweight alternative?

2007-06-29 Thread raiph
Hi y'all. Consider: system(($?OS eq any MSWin32 mingw) ?? 'cls' !! 'clear'); Is it already legal syntax to write, or, if not, would it be possible and desirable to allow: system('cls' !! 'clear' ?? ($?OS eq any MSWin32 mingw)); ? If your answer is that it's not yet legal but

Re: Ternary endweight alternative?

2007-06-29 Thread Chas Owens
On 6/29/07, raiph [EMAIL PROTECTED] wrote: snip Finally, but very importantly imo, what if there are 3 or more alternatives? snip Use a hash or array (depending on the selecting data). system((zip win32 linux other, cls clear nuke)$?OS); system({win32='cls', linux='clear', other='nuke'}$?OS);

Re: Ternary endweight alternative?

2007-06-29 Thread Juerd Waalboer
raiph skribis 2007-06-29 1:10 (-0700): system('cls' !! 'clear' ?? ($?OS eq any MSWin32 mingw)); I read this as: given 'cls', use 'clear' if not, and ($?OS eq ...) if so. Which doesn't make sense, because 'cls' is always true. Note that I ofter write ternaries on three lines: