Re: [Oorexx-devel] Question about calling an external routine

2009-01-25 Thread rob...@garrettfamily.us
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


Re: [Oorexx-devel] Question about calling an external routine

2009-01-25 Thread Rony G. Flatscher


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


Re: [Oorexx-devel] Question about calling an external routine

2009-01-25 Thread rob...@garrettfamily.us
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?

Also, thanks for the tip on the logging framework.

Thanks again,
Robert
  -Original Message-
  From: Rony G. Flatscher [mailto:rony.flatsc...@wu-wien.ac.at]
  Sent: Sunday, January 25, 2009 2:15 PM
  To: Open Object Rexx Developer Mailing List
  Subject:  Re: [Oorexx-devel] Question about calling an external routine



  rob...@garrettfamily.us wrote:
(Apologies in advance if I've sent this to an inappropriate list)

Is it possible to pass an instance of an object from an externally
called routine back to the parent routine? If so, how?

Example:
Assume two separate REXX routines (separate files):  MAIN.rex and
LOGGER.rex.
I'd like to be able to, from MAIN, call LOGGER (passing it a file name),
and have LOGGER create an instance of a stream object, open the file, and
then pass the stream object back to MAIN at which point MAIN would be able
to use the stream object to write to the file (or perhaps pass it to other
external routines that would also be able to use it).
I'm already doing this with LOGGER being a routine that is part of MAIN
(both located in the same file), but I want to be able to break LOGGER out
into a separate file.

Is this possible?
  Sure. Break out the routines add the keyword "PUBLIC" to each routine in
LOGGER.rex. Then, before using the public routines which now reside in
LOGGER.rex you need to "CALL LOGGER", which will cause its public routines
(and public classes) to become visible. 'Thereafter you can access all those
routines as if they were defined in MAIN.rex.


I've been writing and using REXX for many years in the mainframe
environment so I'm quite familiar with the core language, but the facilities
of ooREXX are still somewhat new to me.
  If you are developing a logging facility for Rexx you might want to learn
about an ooRexx implementation of the log-framework that originates from the
Java world. Here's an article to that ooRexx framework, demonstrating how to
use it:
. The ooRexx code of the "log4rexx" framework can be downloaded
from: ,
in case it is of interest for you.

  HTH,

  ---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


Re: [Oorexx-devel] Question about calling an external routine

2009-01-25 Thread Rony G. Flatscher

rob...@garrettfamily.us wrote:
> (Apologies in advance if I've sent this to an inappropriate list)
>  
> Is it possible to pass an instance of an object from an externally
> called routine back to the parent routine? If so, how?
>  
> Example:
> Assume two separate REXX routines (separate files):  MAIN.rex and
> LOGGER.rex.
> I'd like to be able to, from MAIN, call LOGGER (passing it a file
> name), and have LOGGER create an instance of a stream object, open the
> file, and then pass the stream object back to MAIN at which point MAIN
> would be able to use the stream object to write to the file (or
> perhaps pass it to other external routines that would also be able to
> use it).
> I'm already doing this with LOGGER being a routine that is part of
> MAIN (both located in the same file), but I want to be able to break
> LOGGER out into a separate file.
>  
> Is this possible?
Sure. Break out the routines add the keyword "PUBLIC" to each routine in
LOGGER.rex. Then, before using the public routines which now reside in
LOGGER.rex you need to "CALL LOGGER", which will cause its public
routines (and public classes) to become visible. 'Thereafter you can
access all those routines as if they were defined in MAIN.rex.
>  
> I've been writing and using REXX for many years in the mainframe
> environment so I'm quite familiar with the core language, but the
> facilities of ooREXX are still somewhat new to me.
If you are developing a logging facility for Rexx you might want to
learn about an ooRexx implementation of the log-framework that
originates from the Java world. Here's an article to that ooRexx
framework, demonstrating how to use it:
.
The ooRexx code of the "log4rexx" framework can be downloaded from:
, in
case it is of interest for you.

HTH,

---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


[Oorexx-devel] Question about calling an external routine

2009-01-25 Thread rob...@garrettfamily.us
(Apologies in advance if I've sent this to an inappropriate list)

Is it possible to pass an instance of an object from an externally called
routine back to the parent routine? If so, how?

Example:
Assume two separate REXX routines (separate files):  MAIN.rex and
LOGGER.rex.
I'd like to be able to, from MAIN, call LOGGER (passing it a file name), and
have LOGGER create an instance of a stream object, open the file, and then
pass the stream object back to MAIN at which point MAIN would be able to use
the stream object to write to the file (or perhaps pass it to other external
routines that would also be able to use it).
I'm already doing this with LOGGER being a routine that is part of MAIN
(both located in the same file), but I want to be able to break LOGGER out
into a separate file.

Is this possible?

I've been writing and using REXX for many years in the mainframe environment
so I'm quite familiar with the core language, but the facilities of ooREXX
are still somewhat new to me.

Thanks,
Robert Garrett

“A human being should be able to change a diaper,
plan an invasion, butcher a hog, conn a ship,
design a building, write a sonnet, build a wall,
set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, pitch manure,
solve equations, analyze a new problem,
program a computer, cook a tasty meal,
fight efficiently, and die gallantly.
Specialization is for insects.”-Robert A. Heinlein

--
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


Re: [Oorexx-devel] Help with the 3 test suite failures on 64-bit

2009-01-25 Thread Rainer Tammer
Hello,

Mark Miesfeld wrote:
> On Sat, Jan 24, 2009 at 3:38 PM, Rick McGuire  wrote:
>   
>> I've sort of been ignoring this issue since Rainer reported the same
>> for 64-bit AIX.  This is largely because I was already a bit burded
>> out with dealing with the twists and turns of floating point. It
>> appears that basically this is getting converted to a double  value,
>> so it doesn't end up being an exact match.  I've checked in some
>> changes for those test cases that *might* fix the problem.
>> 
>
> Thanks Rick.
>
> The changes did clear up the failures.  This is using a 64-bit build on 
> Windows:
>
>   
OK,
I will test this on 64 bit AIX as soon as possible...

Bye
  Rainer

> ooTest Framework - Automated Test of the ooRexx Interpreter
>
>
> Interpreter: REXX-ooRexx_4.0.0(MT) 6.03 24 Jan 2009
> ooRexxUnit:  2.0.0_3.2.0ooTest: 1.0.0_4.0.0
>
> Tests ran:   19022
> Assertions:  551702
> Failures:0
> Errors:  0
> Skipped files:   1
>
> File search:00:00:05.812000
> Suite construction: 00:00:02.203000
> Test execution: 00:03:47.375000
> Total time: 00:03:56.312000
>
> The skipped file is an oleObject test because I don't have Excel
> installed on this system.
>
> I guess I should add some text in the print out showing the addressing
> mode of the build.
>
> --
> Mark Miesfeld
>
> --
> 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
>
>
>   

--
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