As suggested by error too many argument pops up when number of argument is more then you defined.
Regards-
Bikash Jain
-original message-
Subject: [tinspire] too many arguments
From: Jean Pierre Daviau <davi...@videotron.ca>
Date: 28/03/2011 7:04 PM
Hi,
I am trying my first program and I have got a too many arguments prompt.
eul(1,1,0.4)
---
Define LibPub eul(x,y,h)=
Func
:Local a=5
:Local q
:While a-- >0
:q=y + h*(y)
:eul((x+1),q,h)
:EndWhile
:EndFunc
-----------
Thanks for your attention,
JP
--
To post to this group, send email to tins...@googlegroups.com
To unsubscribe send email to tinspire+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
The tns documents shared by group members are archived at
http://lafacroft.com/archive/nspire.php
Local a=5
This line doesn't make sense, you can't define and assign in the same
command. Plus, assignment isn't done by =, = is the comparison.
While a-- >0
There's no ++ or -- notion on the Nspire; plus, you can't make
assignments on the while conditions.
q=u+h*(y)
Besides assignment isn't performed like this, h*(y) in Nspire notation
is the same as h*y, the multiplication of two numbers.
Basic rules:
Local var1, var2, ...
Defines var1, var2, ... as local variables.
Assignment:
a:=1
b:=2x
f(x):=sin(x)
While Loops
while( a>-1)
doStuff()
a:=a-1
endwhile
For loop
n:=1
for i,1,10,1
n:=n*i
endfor
return n
You can't just copy&paste code from other languages and expect it to work.
Cheers,
Nelson
On Mon, Mar 28, 2011 at 14:33, Jean Pierre Daviau <davi...@videotron.ca> wrote:
> Hi,
>
> I am trying my first program and I have got a too many arguments prompt.
>
> eul(1,1,0.4)
> ---
> Define LibPub eul(x,y,h)=
> Func
> :Local a=5
> :Local q
> :While a-- >0
> :q=y + h*(y)
> :eul((x+1),q,h)
> :EndWhile
> :EndFunc
> -----------
>
> Thanks for your attention,
>
> JP
>
--
--
To post to this group, send email to tins...@googlegroups.com
To unsubscribe send email to tinspire+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
The tns documents shared by group members are archived at
http://lafacroft.com/archive/nspire.php