On 2023-01-02 11:19:51 Rony G. Flatscher wrote: > Dave, could you look at the enclosed sample and give some feedback whether > it serves its purpose (demonstrate the new ADDRESS...WITH in an > understandable manner)? > > ---rony > > On 02.01.2023 14:53, Dave Jones wrote: > > Not knowing very much about the new ADDRESS...WITH... feature, I would > > think that it would be a very useful example. > > DJ > > > > On Mon, Jan 2, 2023 at 7:08 AM Rony G. Flatscher > > <rony.flatsc...@wu.ac.at> wrote: > > > > One of the many new great features of ooRexx 5.0.0 is the > > ADDRESS...WITH variant. > > > > In order to demonstrate how to use it, here an idea: have a sample > > that uses curl command (available > > on all modern operating systems) to fetch the latest ooRexx > > documentation files from SourceForge and > > download them into a subdirectory named docs.V, where "V" would be > > the ooRexx version. Supplying the > > optional ooRexx version (e.g. "4.2.0", "5.0.0", "5.1.0beta", etc.) > > would download all the documentation files from the given SourceForge > > oorexx-docs directory. > > > > What do you think, would that be a helpful sample to add to ooRexx? > > > > ---rony
1) "needle" is not very meaningful. Perhaps "component"? 2) If no directory is supplied, perhaps "ooRexxDocs" should be the default? 3) After creating ooRexxDocs directory and specifying it on the command line, getOoRexxDocs.rex insists that it does not exist: ~/bin/rexx | $ mkdir ooRexxDocs | @12:01:53,leslie@pinto rc=0 | ~/bin/rexx | $ getOoRexxDocs.rex ooRexxDocs | +++ "LINUX COMMAND /home/leslie/bin/rexx/getOoRexxDocs.rex" | 42 *-* dirArr=getDirectories() -- get array of available document directories | >>> "an Array" | +++ Interactive trace. "Trace Off" to end debug, ENTER to continue. +++ | | 45 *-* if .sysCargs[1]~isNil=.false, "/h -h /? -? ?"~caselessPos(.sysCargs[1])>0 | >>> "1" | >>> "0" | >>> "0" | | 55 *-* needle="" | >>> "" | | 56 *-* if arg()>0 | >>> "1" | | 56 *-* then | 57 *-* do | | 58 *-* downloadDir=.sysCargs[1] -- desired directory name | >>> "ooRexxDocs" | | 59 *-* needle =.sysCargs[2] -- text fragment file name must possess to be downloaded | >>> "The NIL object" | | 60 *-* if needle~isNil | >>> "1" | | 60 *-* then | 60 *-* needle="" -- any file name qualifies for download | >>> "" | | 61 *-* end | 65 *-* if downloadDir~isNil | dirArr~hasItem(downloadDir)=.false | >>> "1" | | 65 *-* then | 66 *-* do | | 67 *-* say pp(downloadDir) "does not exist, aborting ..." | >>> "[ooRexxDocs] does not exist, aborting ..." | [ooRexxDocs] does not exist, aborting ... | | 68 *-* exit -1 | >>> "-1" | @12:04:04,leslie@pinto rc=255 Leslie -- Platform: GNU/Linux Hardware: x86_64 Distribution: openSUSE Leap 15.4 Open Object Rexx: 5.0.0 r12286 Build date: Aug 12 2021 _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel