I think it's a universe/unidata difference. I get the segmentation fault
running unidata in ecl type U as well.
Here's some interesting info and an ugly hack--in unidata.
Apparently, the keywords SUBROUTINE and FUNCTION are interchangable 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))
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Burwell, Edward
> Sent: Thursday, June 23, 2005 4:09 PM
> To: '[email protected]'
> Subject: RE: [U2] Custom Functions
>
>
> I've never seen this asterisk thing on the front of a
> cataloged program. I've never had to do that in UniData. I
> can call a SUBROUTINE fine from a Virtual attribute no
> problem - and not asterisk. Could it have something to do
> with the fact that we run BASICTYPE 'p' and ECLTYPE 'p'?
>
> -----Original Message-----
> From: gerry-u2ug [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 23, 2005 1:41 PM
> To: [email protected]
> Subject: RE: [U2] Custom Functions
>
>
> 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
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Burwell, Edward
> Sent: Thursday, June 23, 2005 10:46 AM
> To: [email protected]
> Subject: RE: [U2] Custom Functions
>
>
> Here is a sample:
>
> MYFUNC looks like:
>
> 001 FUNCTION MYFUNC(ARG)
> 002 RETURN (ARG="Y")
> 003 END
>
> MYFUNC is globally cataloged
>
> DICT FILE TEST looks like:
>
> 001 V
> 002 SUBR("MYFUNC","Y")
> 003
> 004
> 005 1R
> 006 S
>
> when I LIST FILE TEST, I get a Segmentation fault(coredump)
> and it dumps me into Unix.
>
> -----Original Message-----
> From: Ray Wurlod [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 23, 2005 1:22 AM
> To: [email protected]
> Subject: RE: [U2] Custom Functions
>
>
> Try using the SUBR() function, as I mentioned in another post.
>
> ----- Original Message -----
> From: "Burwell, Edward" <[EMAIL PROTECTED]>
> To: "'[email protected]'" <[email protected]>
> Subject: RE: [U2] Custom Functions
> Date: Wed, 22 Jun 2005 19:49:44 -0400
>
> >
> > I've tried "calling" functions from UniData Virtual
> Attribute and they
> blow
> > up. Bummer.
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
>
> ______________________________________________________________________
> This e-mail has been scanned by MCI Managed Email Content
> Service, using
> Skeptic(tm) technology powered by MessageLabs. For more
> information on MCI's Managed Email Content Service, visit
> http://www.mci.com.
> ______________________________________________________________________
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
>
> ______________________________________________________________________
> This e-mail has been scanned by MCI Managed Email Content
> Service, using
> Skeptic(tm) technology powered by MessageLabs. For more
> information on MCI's Managed Email Content Service, visit
> http://www.mci.com.
> ______________________________________________________________________
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/