Re: Bash: (foo==0)?foo=1:foo=0 valid?



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.)
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines



Relevant Pages