From: matias_mutchinick@iname.com
Newsgroups: comp.sys.hp48
Subject: Re: SUBROUTINES !!
Date: Tue, 13 Oct 1998 16:13:42 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 81
Message-ID: <6vvu7m$u1b$1@nnrp1.dejanews.com>
References: <6vpbbv$bpa$1@nnrp1.dejanews.com>
NNTP-Posting-Host: 148.207.101.68
X-Article-Creation-Date: Tue Oct 13 16:13:42 1998 GMT
X-Http-User-Agent: Mozilla/4.03 [en] (Win95; I)
X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 148.207.101.68
Xref: republic.btigate.com comp.sys.hp48:17236



> Please Somebody explain me how use subroutines in SYS-RPL
>
> Alguien sabe como se usan (crear y llamar) subrutinas al programar en SYS-RPL
>
> Agradecera todo tipo de sugerencias
>
> RENAN


Hi,

I think you have to do something like this.
this is your prog....

::

   '                          /*(# 6E97h)push the next object to the stack */
   ::
    subroutine 1              /*Here: your subroutine*/
   ;

   '                          /*(# 6E97h)push the next object to the stack */
   ::
   subroutine 2               /*Here: your subroutine*/
   ;
   ...
   ...                        /*more and more subroutines*
   ...

   '                          /*(# 6E97h)push the next object to the stack */
   ::
   subroutine n               /*Here: your subroutine*/
   ;

   { LAM SUB1                 /*a list with LAM + the name of your sub
     LAM SUB2                   you must put one for each subroutine*/
     ...
     ...
     ...
     LAM SUBN }

     BIND                     /*(# 74D0h) starts temporary enviroment /*


     /* BLABLABLA... Here is the rest of your prog.            */
     /* when you want to evaluate a subroutine, tou just call  */
     /* the desired LAM.                                       */
     /* Examle:                                                */
     /*                                                        */
     /* LAM SUB1                                               */
     /*                                                        */
     /* and the subroutine is executed.                        */


     ABND                     /*(# 7497h)finish temporary enviroment*/

;

Thats it, I think... I never used it but I saw it somewhere.

Matias Mutchiick
mmb@quetzal.innsz.mx
http://www.datos.com/hp48
