rob...@garrettfamily.us wrote:
> Thanks for the reply, Rony.
>  
> I've been reading about the ::REQUIRES and ::ROUTINE directives in the
> doc but so far haven't hit on the correct coding to get them working
> properly.  These directives/concepts don't exist in mainframe REXX so
> they're new to me.
> Is there a simple example I can look at that would reveal the proper
> coding structure?
O.K., here's an example:

    /* MAIN.rex */
    call LOGGER   /* this will make LOGGER's public routines (and public
    classes) accessible */
    res=loggerDoSomething("hey, you!")
    say "res="res

    streamObj=loggerCreateStream("myFilename.log")
    streamObj~lineout(res)
    streamObj~close

Here's an example for the LOGGER.rex program:


    /* LOGGER.rex */

    ::routine loggerDoSomething public  /* returns the reversed
    argument-string */
       parse arg val
       return reverse(val)

    ::routine loggerCreateStream public /* creates a stream object with
    the given filename */
       parse arg filename
       return .stream~new(filename)


>  
> Also, thanks for the tip on the logging framework.
You are very welcome.

---rony

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to