Quote: "I have to disagree, I think this comment is a little unfair and overly critical."
It wasn't my intent to be either. It was meant to indicate I didn't think it was correct.
Quote: "
The statement is perfectly valid in a number of languages."
'(Rnd(0,66)=33)' is valid in any language that uses '=' as equality in logic statements. In other languages it would be '(Rnd(0,66)==33)'. But in any case, it is not used to return a numerical value in an equation. It should not be assumed that 'true' is one and 'false' is zero.
Quote: "Perhaps in a world where every language is C. But in our world, the real one, (Rnd(0,66)=33) should return true or false."
Yes, I am aware of that and have used it in logical things frequently.
But the code is using it in a math formula.
'(Rnd(0,66)=33?1:0)' is valid in AppGameKit Basic, Perl, C, Javascript, Java, PHP and lots of languages. But note that the first one I listed is AppGameKit Basic.
Since the issue the poster mentioned was not getting the correct numeric results, I was pointing out a possible problem with how he was trying to get the results.
And, even though it might work, as JimHawkins says, it is dangerous programming.
Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master