Golly geewillikers, I do apologize for posting a serious reply, so
close to the start of the US & Canadian 3-day Labor (Canadian: Labour)
Day holiday weekend, but . . .
Are you in INFORMATION flavour?
UV 10.3 Basic Ref, pg 263: "In INFORMATION flavor accounts, the
EXECUTE statement without any options is the same as the PERFORM
statement. In this case executed commands keep the same environment as
the BASIC program that called them. Use the EXEC.EQ.PERF option of the
$OPTIONS statement to cause EXECUTE to behave like PERFORM in other
flavors."
The main difference between PERFORM and EXECUTE is whether the child
program runs in same envirionment as the calling one. Among other
things, that determines what happens to some of the @variables, e.g.,
@user0.
If the above does not immediately account for the quirks you see, read
the details in the manual. There may be something similar with other
flavours. And I wonder if the manual might be inexact or a bit inaccurate.
EXECUTE's behaviour will vary depending on account flavour and depending
on whether any compiler $OPTIONS override it.
See basic ref manual $OPTIONS:
$OPTIONS PICK | INFORMATION | REALITY | DEFAULT | PIOPEN
$OPTIONS EXEC.EQ.PERF | PERF.EQ.EXEC | PIOPEN.EXECUTE
Basic Ref manual also has appendix E that shows which @variables are
"stacked" or not. The values of nonstacked @variables are shared
between the EXECUTE and calling environments. Stacked are isolated to
the execution level. @USER0-4 are stacked.
While you're at it, examine uvconfig PIOPENDEFAULT, too, but only if you
have piopen flavored accounts. Off hand, I can't think of another
uvconfig setting that might matter.
Chuck
P.S. In all candour, I favour the Canadian behaviour of adding the "u"
to "Flavour" and Labour" thanks to my Albertan grade school education.
I've freely mixed and matched above. It's rugh trying to remember when
to add the "u" and when to leave it off. Adourable, isn't it?
-------- Original Message --------
Subject: Re: [U2] Hmmmm...Learn something new every day!
Date: Fri, 4 Sep 2009 16:56:13 -0400
From: Steven M Wagner <[email protected]>
Reply-To: Steven M Wagner <[email protected]>, U2 Users List
<[email protected]>
To: U2 Users List <[email protected]>
And a fine PERFORMance you are providing us. . . . .
-- Sent from my Palm Pre
George Gallen wrote:
I wonder if you use EXECUTE without any CLAUSES, the compiler
converts it to a PERFORM?
sounds like I'm anti-Santa here....EXECUTING CLAUSES!
-----Original Message-----
From: [email protected] [mailto:u2-users-
[email protected]] On Behalf Of George Gallen
Sent: Friday, September 04, 2009 4:33 PM
To: U2 Users List
Subject: Re: [U2] Hmmmm...Learn something new every day!
But the question is, why does removing the CAPTURING CLAUSE
fix the problem (allow passing the data).
with the CAPTURING, user0 won't pass
without the CAPTURING, user0 passes fine
I thought PERFORM and EXECUTE were the same?
George
> -----Original Message-----
> From: [email protected] [mailto:u2-users-
> [email protected]] On Behalf Of Tom Whitmore
> Sent: Friday, September 04, 2009 4:30 PM
> To: U2 Users List
> Subject: Re: [U2] Hmmmm...Learn something new every day!
>
> EXECUTE creates a new environment, try PERFORM. From BASIC Help:
>
> EXECUTE creates a new environment for the executed command.
> This new environment is initialized with the values of the
> current prompt, current printer state, Break key counter, the
> values of in-line prompts, KEYEDITs, KEYTRAPs, and KEYEXITs.
> If any of these values change in the new environment, the
> changes are not passed back to the calling environment. In the
> new environment, stacked @variables are either initialized to
> 0 or set to reflect the new environment. Nonstacked @variables
> are shared between the EXECUTE and calling environments.
>
> Tom
>
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users