Jump to content



Photo
- - - - -

Getting "incorrect Number Of Arguments"


  • Please log in to reply
2 replies to this topic

#1 Nctec11

Nctec11

    Newbie

  • Members
  • Pip
  • 2 posts
  • Gender:Male

  • Calculators:
    Casio fx-CG10
    casio fx-CP400
    HP-48GX

Posted 11 August 2014 - 05:38 PM

I just bought the Class Pad fx-Cp400, and I am trying to learn how to program with it. First of all, is there a comprehensive manual out there that any newbie can use to learn programming?

Secondly, can anyone tell me why I am getting the "Incorrect number of arguments" for the following IF ELSE ... program that I am just testing out?

SetDecimal
Input a
Input b
If a>b
Then a-b=>c
Else b-a=>c
IfEnd
Print a
Print b
Print c

When I try to save the above, I get a "Incorrect number of arguments" error. Hope you can help.

Thanks,

Dan
Lake Charles, LA

#2 pan.gejt

pan.gejt

    Casio Freak

  • Members
  • PipPipPipPip
  • 128 posts
  • Gender:Male
  • Location:CZ

  • Calculators:
    fx-880, fx-6300G, fx-9700GE, fx-9860G Slim, Classpad 330-A, TI-Nspire + keypad, TI-Nspire CAS, TI-Nspire CX CAS,TI-89 Titanium, HP-50g, SEC-101, fx-991ES PLUS, fx-991DE PLUS, fx-CP400, Canon X MARK I PRO, Citizen SRP-75,

Posted 12 August 2014 - 04:38 PM

Try this, I wrote the calculation on the new row.

SetDecimal
Input a
Input b
If a>b
Then
a-b=>c
Else
b-a=>c
IfEnd
Print a
Print b
Print c

#3 Nctec11

Nctec11

    Newbie

  • Members
  • Pip
  • 2 posts
  • Gender:Male

  • Calculators:
    Casio fx-CG10
    casio fx-CP400
    HP-48GX

Posted 12 August 2014 - 08:37 PM

Thank you very much, Casio Fan. It seems that the only difference is that that the commands THEN and ELSE are placed on their own lines, and the expression on another line. Who knew?

Once again, thank you so much for pointing that out.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users