Thanks for the push in the right direction, I actually have it working now.
One more quick question just because I'm being lazy at the moment: in
LOGGER, is there a function/method I can call that will tell me 1) that it
is being invoked from a 'parent' calling routine (as opposed to being
started from a command prompt) and 2) what the name of that parent routine
is?
Thanks again for the help,
Robert
-----Original Message-----
From: Rony G. Flatscher [mailto:rony.flatsc...@wu-wien.ac.at]
Sent: Sunday, January 25, 2009 4:46 PM
To: Open Object Rexx Developer Mailing List
Subject: Re: [Oorexx-devel] Question about calling an external routine
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