Re: ti89: questions


[Prev][Next][Index][Thread]

Re: ti89: questions



Laurent Deniau <Laurent.Deniau@cern.ch> wrote in message
36FF4BEC.9B8BA71F@cern.ch">news:36FF4BEC.9B8BA71F@cern.ch...
> Sorry, but I can't find out the answers to these questions in the
manual...
>
> 1) How do you modify and/or return a local variable or parameter of a
> sub-program (I don't want to use a global variable) ?
>
> printstr()
> Prgm
> Local getname
> Define getname(name)=Prgm
>  Request "file name",name
>  Return name     (Meaningless for program)
>  EndPrgm
> getname()->name  (Forbidden for programs)
> EndPrgm
>
> Idem with name passed as a parameter.

You can't use name as both a parameter and a local variable.  If you want to
pass name to the sub, use it in the parentheses as above.  Local variables
can't be modified permanently.  They cease to exist after the program ends.

Tom Lake
ICQ #25589135

******************************************************************
* To UNSUBSCRIBE, send an email TO: listserv@lists.ppp.ti.com
* with a message (not the subject) that reads SIGNOFF CALC-TI
*
* Archives at http://peach.ease.lsoft.com/archives/calc-ti.html
******************************************************************


Follow-Ups: References: