gerry-u2ug wrote:

> globally catalogued as in CATALOG SUB.BP *MYFUNC ?
> so you should be using : SUBR("*MYFUNC","Y")
>
> we do this all the time in universe since at least v7

As others have mentioned, its a difference between UniData and UniVerse.  On
UniData you *CAN* use an asterisk before a SUBROUTINE name to identify it as
globally cataloged, but there is no need to and no benefit gained from doing
it.

[EMAIL PROTECTED] wrote:

> Here's some interesting info and an ugly hack--in unidata.
> Apparently, the keywords SUBROUTINE and FUNCTION are interchangeable as
> far as BASIC is concerned, so create a subroutine
>       SUBROUTINE MYHACK(A,B)
>       A=B*2                   ;* note that we both assign the result
> to a parameter AND return the result
>       RETURN A
> Then you can call it as a function with
>       PROGRAM HACKTEST
>       DEFFUN MYHACK(A,B)
>       CRT MYHACK('',2)        ;* <--- there's the hack. You need that
> placeholder parameter
> Or use it as a subroutine:
>       PROGRAM HACK2
>       CALL MYHACK(A,2)
>       CRT A
> Or from a virtual attribute:
>       I
>       SUBR('MYHACK',EXTRACT(@RECORD,1,0,0))

That's quite interesting Ed.  Does it behave the same if you code MYHACK as
'FUNCTION MYHACK(A,B)'?

Cheers,

Ken
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to