                'Define function' little utility, version 1.0
                        by Jorge Costa in Aug 28, 1995 

THE AUTHOR OF THIS PROGRAM MAKES NO WARRANTY ABOUT IT'S PERFORMANCE. THE 
DEF.ZIP FILE CAN BE FREELY COPIED, BUT NOT MODIFIED WITHOUT PERMISSION FROM 
THE AUTHOR. THIS SOFTWARE IS GIFTWARE.  

Introduction:

DEF is a little System RPL routine which was born because of an article 
posted on comp.sys.hp48 . 

This utility takes a symbolic expression as input and creates a program to 
evaluate it, with necessary arguments in the stack. 

BYTES & CHECKSUM: 122.5 #1AECh

Credits:

 Murray Rogers ( mrogers@jolt.mpx.com.au ), for the original idea !
 Mika Heiskanen, for JAZZ.LIB, HACK.LIB and for ENTRIES.SRT 

Source Code:

The source code provided is to be used for educational purposes.
As it has no heading, it must be compiled in the HP48 with a System RPL
compiler, available in all HP48 related FTP sites in the Internet ( Look for
the JAZZ package or the RPL48 toolkit, from Detlef Mueller).

----------Cut Here----------
%%HP: T(1)A(D)F(.);
"
::
 CK1NoBlame
 CK&DISPATCH1
 symb
 ::
  '
  x<<
  '
  x
  3PICK
  PTR 353AB       (FINDVAR)
  toLEN_DO
  ::
   DUP
   INDEX@
   NTHCOMPDROP
   PTR 5AED       (ID>LAM)
   SWAP
  ;
  LOOP
  LENCOMP
  FOUR
  #+
  DUPROLL
  INNERDUP
  #1+_ONE_DO
  ::
   SWAP
   DUPTYPEIDNT?
   ITE
   ::
    PTR 5AED      (ID>LAM) 
    OVER
    #1+UNROLL
   ;
   ::
    OVER
    #1+UNROLL
   ;
  ;
  LOOP
  SYMBN           (Build symbolics)
  '
  x
  str
  ROLL
  ::N
 ;
;"
--------End------------------------

Hope you will like/use it...
                                   
    ----------------------------------------------------------------
   |      -Jorge Costa-   _Chemical Eng. Student & HP48 maniac_     |
   |                   < l38861@alfa.ist.utl.pt >                   |
    ----------------------------------------------------------------
