In message [EMAIL PROTECTED], [EMAIL PROTECTED]
writes
When I said 'hack' I meant the ugly code that I had to create to make
the trick work--the idea of having to put a dummy parameter into the
function call in the basic program in order to make it compatable with
the subr call in the i-type.
[EMAIL PROTECTED] writes
When I said 'hack' I meant the ugly code that I had to create to make
the trick work--the idea of having to put a dummy parameter into the
function call in the basic program in order to make it compatible with
the subr call in the i-type. Sorry for the confusion there.
Ken:
Ditto! :-) One might add faster and more stable triggers and built-in
input timing.
Bill
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ken Wallis
Sent: Friday, June 24, 2005 6:04 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2
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.
It seems completely wrong to me (UV in Prime flavour)
Apparently, the keywords SUBROUTINE and FUNCTION are interchangable
Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 23, 2005 5:52 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
I think it's a universe/unidata difference. I get the
segmentation fault running unidata in ecl type U as well
] On Behalf Of Wendy Smoak
Sent: Thursday, June 23, 2005 12:18 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Custom Functions
From: Ray Wurlod [EMAIL PROTECTED]
Try using the SUBR() function, as I mentioned in another post.
Ouch. Granted my function opens a file and [currently, for debug
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Anthony
Dzikiewicz
Sent: Friday, June 24, 2005 9:40 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
Something I did in some subroutines which makes them more of a multi
tasker (I
PROTECTED]
Sent: Saturday, 25 June 2005 1:46 a.m.
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
Well, the idea was to produce something that could be called as a
function from basic, because the function calling syntax is cool and
convenient in a lot of cases, but that could
PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of phil walker
Sent: Friday, June 24, 2005 4:21 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions - UV or UD
One I can thing of, and I normally work on UV and prefer, is
that you can debug programs which interact with file
-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ken Wallis
Sent: Friday, June 24, 2005 9:04 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
[EMAIL PROTECTED] wrote
So you can mix and match between treating it as a subroutine and as a
function
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Wendy Smoak
Sent: Wednesday, June 22, 2005 8:47 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Custom Functions
--- snip ---
We consider subroutines fairly expensive in terms of system
resources,
Message-
From: Ray Wurlod [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 23, 2005 1:22 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
Try using the SUBR() function, as I mentioned in another post.
- Original Message -
From: Burwell, Edward [EMAIL PROTECTED
From: Ray Wurlod [EMAIL PROTECTED]
Try using the SUBR() function, as I mentioned in another post.
Ouch. Granted my function opens a file and [currently, for debug] prints to
the screen, but attempting to call it with SUBR from an I-Descriptor
caused... '25945 Bus error' and left the session
-users@listserver.u2ug.org
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
Wendy;
I tend not to use a FUNCTION unless I really need it for the syntax. It
helps me to remember that even when calling a function you can change
any of the passed variables - not just the return variable (just like a
subroutine). For some reason I didn't think a function could do that,
I'm
'?
-Original Message-
From: gerry-u2ug [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 23, 2005 1:41 PM
To: u2-users@listserver.u2ug.org
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
Ouch. Granted my function opens a file and [currently, for
debug] prints to the screen, but attempting to call it with
SUBR from an I-Descriptor caused... '25945 Bus error' and
left the session unresponsive.
I don't get the example as posted - seems like F.FILE doesn't get saved
anywhere
Of
Burwell, Edward
Sent: Thursday, June 23, 2005 4:09 PM
To: 'u2-users@listserver.u2ug.org'
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
PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 23, 2005 5:52 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
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
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
I could be wrong, but AFAIK a FUNCTION is just a SUBROUTINE with some
syntax magic (the DEFFUN statement) that lets you reference it in an
expression rather than using the CALL statement. A function call has the
same overhead as a subroutine call. You can't put local functions inside
of your
In a function, you would RETURN(-1). In a subroutine, you would pass
back a variable as one of the parameters.
RESULT = '';MY.VAR='SOMETHING'
CALL MY.SUB(RESULT, MY.VAR)
IF RESULT = @TRUE .. Whatever
.
.
SUBROUTINE MY.SUB(RESULT, MY.VAR)
[EMAIL PROTECTED]
IF MY.VAR = 'SOMETHING' THEN [EMAIL
: Wednesday, June 22, 2005 04:05 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
In a function, you would RETURN(-1). In a subroutine, you would pass
back a variable as one of the parameters.
RESULT = '';MY.VAR='SOMETHING'
CALL MY.SUB(RESULT, MY.VAR)
IF RESULT = @TRUE
From: Burwell, Edward [EMAIL PROTECTED]
I use/write functions all the time. I love 'em. You can return ANYTHING
you want from a single digit to an array. If you have some specific
questions, ask away.
Can you use them in I-Descriptors? Doesn't look like it from 'Using
UniData' though I
Previous posters have pretty much covered the ground. UniVerse (and, I suspect
but can't be certain about, UniData) functions are implemented as subroutines,
with the first argument position on the stack reserved for the return value
which is a DATUM. It can even be a file variable or
You can use functions in I-descriptors (via the SUBR function only) because the
mechanism that reserves the first position on the stack for functions is
exactly the same mechanism used by the SUBR() function.
You can not use custom functions directly as functions in I-descriptors because
you
I've tried calling functions from UniData Virtual Attribute and they blow
up. Bummer.
-Original Message-
From: Ray Wurlod [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 22, 2005 7:00 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
Previous posters have pretty
From: Burwell, Edward [EMAIL PROTECTED]
I use/write functions all the time. I love 'em. You can
return ANYTHING
you want from a single digit to an array. If you have some specific
questions, ask away.
Wendy Smoak wrote:
Can you use them in I-Descriptors? Doesn't look like it from
Try using the SUBR() function, as I mentioned in another post.
- Original Message -
From: Burwell, Edward [EMAIL PROTECTED]
To: 'u2-users@listserver.u2ug.org' u2-users@listserver.u2ug.org
Subject: RE: [U2] Custom Functions
Date: Wed, 22 Jun 2005 19:49:44 -0400
I've tried calling
29 matches
Mail list logo