Using ooRexx sample semaphore class

Developers
2013-07-04
2013-07-05
  • Tim Tierney

    Tim Tierney - 2013-07-04

    This post was added to the wrong forum - please see the Help forum if interested in the problem. Edited 07/05/13 - TGT.

    I am attempting to use the sample semaphore file 'semcls.rex' as supplied by ooRexx v4.1.2 in the \samples directory. If I run the following code snippet:

    /*-- REXX Procedure: testSem   --*/
    
    sHandl = .Semaphore~init( "tstSem" )
    
    Say  sHandl
    Exit 0
    
    ::Requires semcls.rex
    

    I receive the following error messages on the console:

       105 *-* .message~new(self, .array~of('INIT', super), 'a', arg(1,'a'))~send 
         3 *-* sHandl = .Semaphore~init( "tstSem" )
    Error 93 running D:\REXX\testSem.rex line 105:  Incorrect call to method
    Error 93.902:  Too many arguments in invocation of method; 0 expected
    

    The prolog of the class file contains the comments regarding the 'init' invocation:

    /*   init - initialize a new semaphore.  Will accept the following positional */
    /*          parameters:                                                       */
    /*                             'name' - global name for this semaphore        */
    /*                                if named default to set name in             */
    /*                                the class semDirectory                      */
    /*                             noshare -  don't define named semaphore        */
    /*                                into class semDirectory                     */
    /*                             Inital state (0 or 1)                          */
    

    In the above run of testSem I have embedded the contents of the 'semcls.rex' file so that all trace back messages will be emitted. The error 93 messages are emitted in either case.

    I'm sure that this is probably a misunderstanding on my part and any help will is appreciated. Thanks!

     
    Last edit: Tim Tierney 2013-07-05
  • Tim Tierney

    Tim Tierney - 2013-07-05

    Posted to the wrong forum -- moved to the Help forum.

     

Log in to post a comment.