Hi there.
I've been trying to convert an old program to CPC Basic 3, and I've come across what may be an error.
Instead, I am getting 10 being printed.
(I have Real Numbers set to 2 in the IDE).
When I change line 20 to:
Am I doing something wrong, or is |MUL flawed?
When I change line 40 to:
*****
EDIT
*****
Please ignore this question.
I was indeed making a mistake - I wasn't setting the indexes for the REALs correctly.
Changing line 20 to:
I've been trying to convert an old program to CPC Basic 3, and I've come across what may be an error.
- Code:
10 piHalf=0
20 con2=0:|VAL,con2,"1.0"
30 |PI,piHalf
40 |MUL,piHalf,piHalf,con2
50 |CINT,@tmp,piHalf
60 PRINT tmp
Instead, I am getting 10 being printed.
(I have Real Numbers set to 2 in the IDE).
When I change line 20 to:
- Code:
20 con2=0:|VAL,con2,"2.0"
Am I doing something wrong, or is |MUL flawed?
When I change line 40 to:
- Code:
40 |ADD,piHalf,piHalf,piHalf
*****
EDIT
*****
Please ignore this question.
I was indeed making a mistake - I wasn't setting the indexes for the REALs correctly.
Changing line 20 to:
- Code:
20 con2=1:|VAL,con2,"1.0"