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 - 04: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
  • 264 posts
  • Gender:Male
  • Location:CZ

  • Calculators:
    .

Posted 12 August 2014 - 03: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 - 07: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.


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users