formatting unary ?:

i have space before and after ? and : checked (the default) in options


[newName appendString:[sex ? malePost :femalePost objectAtIndex:[self random:[sex ? malePost :femalePost count]]]];

i have a line like that but it gets formatted without spaces after the : unless i add parenthesis?


[newName appendString:[(sex ? malePost : femalePost) objectAtIndex:[self random:[(sex ? malePost : femalePost) count]]]];



do i really need the parenthesis?

thanks
2 comments
Comment actions Permalink

it shows

Message select
']' missing

at the question mark, without the parenthessis

0

Please sign in to leave a comment.