Calculator Community > Grammer

Find the error in a beginner's program

<< < (2/4) > >>

persalteas:
Okay...

*persalteas poke Yeong...  (or Xeda, sure)

Yeong:
I just saw this topic.
I'll have to leave soon, but I'll get you the answer by tomorrow ;)
EDIT: Actually, your code is not wrong, but it's input itself. It somehow stores "14" in A when I tried with number 255.

persalteas:
Do you know how to solve the problem ?

storing 0 in A before the Input ?

Xeda112358:
Okay, I believe the problem is just that you have :expr(Input →AC' Input will not normally handle numbers >65535 x.x. I also changed a few things:

--- Code: ---:.0:             ;This line gets ignored because it starts with "."
:Return→B
:ClrDraw
:Line(1,5,9,95,6
:Line(0,6,9,95,6
:Text(8,5,"Base Converter
:/Text(18,0,"Base ?
:DispGraph
:expr(Input →G
:/Text(18,0,"Valeur Décimale ?
:DispGraph
:expr(Input →A  ;
:/Text(30,0,"= "
:Text('°A,G
:DispGraph
:Repeat         ;Added a space here. Just a single space means it uses the last value
:getkey         ;"Repeat getKey" does not change ans
:End
:If =15
:Goto B
:ClrDraw:DispGraph
:Stop

--- End code ---

By the way, it looks nice o.o

persalteas:
OK, Thanks :)

but

--- Code: ---:Repeat         ;Added a space here. Just a single space means it uses the last value
:getkey         ;"Repeat getKey" does not change ans
:End
--- End code ---

Is one byte heavier...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version