Bash: (foo==0)?foo=1:foo=0 valid?
Joe Zeff
joe at zeff.us
Sat Jul 2 18:08:56 UTC 2011
On 07/02/2011 11:01 AM, Marko Vojinovic wrote:
> With a small detail that the "$" in "$foo" is not actually a valid C construct
> itself, right?
>
> Or were you looking at the subject line, where the code doesn't have the "$"?
The trinary operator itself is a valid C construct, even though the
example given wouldn't work. (Thanx for pointing out the error; it's
been way, way too long since I actually did any programming and didn't
notice it.)
More information about the users
mailing list