Priority of operatons
This isn't a left-right thing, it's priority of operations. Multiplies are higher priority so you do them first. This lets you write equations like a = 10b + 5c without tons of brackets (brackets say that a part of a formula has to be done first). With brackets the above is 10 + (10 * 0) = 10.
( , Sun 5 Jun 2011, 11:00, Reply)
This isn't a left-right thing, it's priority of operations. Multiplies are higher priority so you do them first. This lets you write equations like a = 10b + 5c without tons of brackets (brackets say that a part of a formula has to be done first). With brackets the above is 10 + (10 * 0) = 10.
( , Sun 5 Jun 2011, 11:00, Reply)
I have NEVER been taught this and I've programmed computers too, and it all worked fine and as expected,
as has it in the physical world, I understand that when brackets are used that means that that part of the equation must be done first, BUT I was never taught that when maths is written in a sentence like that that it is not to be read as a series of instructions, but as a 'math language' which has rules of order of execution regardless of lack of brackets.
This is weird, how can I not have known this till forty fucking three!?
My school teachers must have been shite!
( , Sun 5 Jun 2011, 11:11, Reply)
as has it in the physical world, I understand that when brackets are used that means that that part of the equation must be done first, BUT I was never taught that when maths is written in a sentence like that that it is not to be read as a series of instructions, but as a 'math language' which has rules of order of execution regardless of lack of brackets.
This is weird, how can I not have known this till forty fucking three!?
My school teachers must have been shite!
( , Sun 5 Jun 2011, 11:11, Reply)
chances are the compiler for your programming language will have taken care of precedence for you?
It's odd for a maths teacher to forgot to teach this...
( , Sun 5 Jun 2011, 11:19, Reply)
It's odd for a maths teacher to forgot to teach this...
( , Sun 5 Jun 2011, 11:19, Reply)
It was 1k basic
and you should know better, there was that or a 16k expansion pack! ;)
( , Sun 5 Jun 2011, 11:21, Reply)
and you should know better, there was that or a 16k expansion pack! ;)
( , Sun 5 Jun 2011, 11:21, Reply)
I can't believe you just tried to correct me on a retro issue.
I'm still right. The Sinclair BASIC language / OS was on an 8K ROM in the ZX81 (4K in the ZX80). Only the RAM size was 1K.
( , Sun 5 Jun 2011, 11:28, Reply)
I'm still right. The Sinclair BASIC language / OS was on an 8K ROM in the ZX81 (4K in the ZX80). Only the RAM size was 1K.
( , Sun 5 Jun 2011, 11:28, Reply)
Oh stop it!
I'm still reeling from the sudden knowledge there's a language to math I never knew about till now!
( , Sun 5 Jun 2011, 11:29, Reply)
I'm still reeling from the sudden knowledge there's a language to math I never knew about till now!
( , Sun 5 Jun 2011, 11:29, Reply)
oh dear oh dear
you weren't very good a programming then I gather?
( , Sun 5 Jun 2011, 14:22, Reply)
you weren't very good a programming then I gather?
( , Sun 5 Jun 2011, 14:22, Reply)