Yeah I agree I usually hate the ternary if statements, but in this
case it compressed code that I felt was overly verbose.
Usually when I read code I automatically substitute symbol for there
english equivalent.
I found that the conditionals just plain sounded better in that context.
newval = (myval == someval) ? somefunction : otherfunction;
Expands out to...
if(myval == someval)
{
newval = somefunction;
}else{
newval = otherfunction;
}
That works great on it's own, but if I'm trying to do it as part of
another larger statement it makes the whole statement overall less
clear.
I don't know, I guess it's maybe I was recently working in lisp, and a
strong sudden desire to add parenthesis overcame me :)
As for the algorithm, this one works fine since one key was that I
didn't want to have to rely on an existing dataset, the only real
world usage that this function will ever see is as part of a testing
harness for a larger overall application.
Still begs the question though, why is the O2 version still ignoring
it, but the O3 version has put it back.
Sincerely,
Steve
On Dec 18, 2007 10:10 AM, Levi Pearson <[EMAIL PROTECTED]> wrote:
> Steve <[EMAIL PROTECTED]> writes:
>
> > I get almost the same behavior if I explicitly initialize it in the for
> > loop.
> > I saw the counter thing earlier this morning and tried.
> >
> > However now the problem only occurs with an O2 build. Why it doesn't
> > occur in O3 anymore is a big mystery to me.
> >
> > Sincerely,
> > Steve
>
> You might try expanding the code a little bit, turning your
> conditional expressions into if statements. A little more clarity
> wouldn't hurt, anyway. You might also try looking into a more
> 'intelligent' name generation algorithm, like using a Markov chain
> based on a bunch of real fantasy names.
>
>
> --Levi
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
>
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/