Posted: Thu Jan 12, 2012 8:54 pm Post subject: RE:Need help with "shooting a projectile" and a "password menu"
That wasnt the point. The point was that you're missing the subtlety of programming, where small differences, although they appear to be similar, are't exactly the same.
Can be confused with trolling.
Sponsor Sponsor
Aange10
Posted: Thu Jan 12, 2012 9:35 pm Post subject: RE:Need help with "shooting a projectile" and a "password menu"
Turing:
var list :array1.. 10ofint:=init(1,2,3,4,5,6,7,8,9,10)
list(Rand.Int(1,10)):= list(Rand.Int(1,10)) + 1 % vs
list(Rand.Int(1,10)) +=1
Is very interesting, but is that really a subtly in the increment operand, or common sense?
+= would definitely be superior in this situation, in my opinion. But as writing code myself, if I saw this problem, I would simply store (Rand.Int (1,10)) into a temp variable.
Raknarg
Posted: Thu Jan 12, 2012 9:53 pm Post subject: RE:Need help with "shooting a projectile" and a "password menu"
In a lot of cases it wont make a difference, anyways.
evildaddy911
Posted: Fri Jan 13, 2012 4:36 pm Post subject: RE:Need help with "shooting a projectile" and a "password menu"
its simply quicker to type
mirhagk
Posted: Fri Jan 13, 2012 6:03 pm Post subject: RE:Need help with "shooting a projectile" and a "password menu"
and as Tony pointed out, technically could be slightly faster (although probably not if there is a good compiler *cough* not turing *cough*)