Loading custom character sets
Moderator: Moderators
Jeff , if My Dear Aunt Sally applied here then it would still be incorrect. According to the order of operations, Multiplication takes precedence over Subtraction which is second and Addition is last in this case ,
My Dear Sally Aunt? . That's what it looks like to me, but then again, if multiplication was done first, then the correct answer would come out 7215 either way, only 1 is being subtracted, I think it goes x / + - , so maybe you were right after all but the way carlsson shows it is :
7168+6*8-1 = 7168+48-1 = 7168+47 = 7215 <- correct evaluation
Multiplication Subtraction Addition
which makes it look like subtraction comes before addition! oopsy doodles
My Dear Sally Aunt? . That's what it looks like to me, but then again, if multiplication was done first, then the correct answer would come out 7215 either way, only 1 is being subtracted, I think it goes x / + - , so maybe you were right after all but the way carlsson shows it is :
7168+6*8-1 = 7168+48-1 = 7168+47 = 7215 <- correct evaluation
Multiplication Subtraction Addition
which makes it look like subtraction comes before addition! oopsy doodles
And now for the grand finale, thanks for the tips Carlsson, helped me finish up my screen pokes efficently whithout doin poke #, poke # , poke #, shout out to Kweepa an Carlsson!!
(ps. for unexpanded vic)
1 poke52,28:poke56,28: clr
2 for i=7168 to 7679:poke i,peek(i+25600):next
3 poke 36869,255
10 for l=7168 to 7168 + 6*8 - 1:read a:pokel,a:next
20 data 48,48,96,96,192,192,254,254
21 data 254,254,192,204,108,96,60,60
22 data 240,240,192,239,239,118,62,30
23 data 62,62,102,102,214,214,6,6
24 data 24,56,112,96,192,192,254,254
25 data 198,230,118,62,30,6,30,30
30 poke 36879,8
35 print"{clr}{white}{right 6, down7} @.a.b.c.d.e."
40 for s = 1 to 1000
45 for i = 1 to 7
50 p=38560
52 for v=1to6: poke p,i:p=p+2:next v
55 for t=1to25:next t:next i:next s
(ps. for unexpanded vic)
1 poke52,28:poke56,28: clr
2 for i=7168 to 7679:poke i,peek(i+25600):next
3 poke 36869,255
10 for l=7168 to 7168 + 6*8 - 1:read a:pokel,a:next
20 data 48,48,96,96,192,192,254,254
21 data 254,254,192,204,108,96,60,60
22 data 240,240,192,239,239,118,62,30
23 data 62,62,102,102,214,214,6,6
24 data 24,56,112,96,192,192,254,254
25 data 198,230,118,62,30,6,30,30
30 poke 36879,8
35 print"{clr}{white}{right 6, down7} @.a.b.c.d.e."
40 for s = 1 to 1000
45 for i = 1 to 7
50 p=38560
52 for v=1to6: poke p,i:p=p+2:next v
55 for t=1to25:next t:next i:next s
Those two lines could possibly be rewritten as:Legacy wrote:50 p=38560
52 for v=1to6: poke p,i:p=p+2:next v
50 p=38560
52 for v=0 to 5:poke p+v*2,i:next v
or even:
50 for p=38560 to 38570 step 2:poke p,i:next p
It depends on whether you actually want variable p to be increased or not. The FOR statement will run up to and including 38570.
Anders Carlsson






What he said. :pLeeeeee wrote:Multiplication and division have the same priority and are executed in order left to right. The same is true for addition and subtraction.
I'm shocked I even know that. I'm awful at math. Oddly enough, I didn't learn this in school. I learned it by trial and error on my VIC when I was 9 or something. Oh what a mystery that was. Pre-internet there were few places to get questioned answered so you just had to form and test your own theories.
- Pedro Lambrini
- Vic 20 Scientist
- Posts: 1132
- Joined: Mon Dec 01, 2008 11:36 am
-
- Vic 20 Hobbyist
- Posts: 147
- Joined: Fri Dec 29, 2006 7:38 am
- Location: Toronto, Canada
Or even BEDMAS.Pedro Lambrini wrote:Brackets, ORDER, Division, Multiplication, Addition, Subtraction. Order basically means 'to the power of'.
I remember that from school too!
Brackets, exponents, division, multiplication, addition, subtraction.
What is "ORDER"? Isn't that what this whole discussion is about?
Realms of Mystery BBS
bbs.pipesup.ca 6400
(currently offline)
bbs.pipesup.ca 6400
(currently offline)
- Pedro Lambrini
- Vic 20 Scientist
- Posts: 1132
- Joined: Mon Dec 01, 2008 11:36 am
I had a look around and found that on the BBC Childrens site they have changed the 'O' from the word Order to the word Other even though they explain Other to be the same as Order! Here's a quote:
"...All of these terms are fairly obvious except for 'Other', which are really just powers (e.g. 23 or 42 etc.)"
Hope that makes more sense.
"...All of these terms are fairly obvious except for 'Other', which are really just powers (e.g. 23 or 42 etc.)"
Hope that makes more sense.
