From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb0e,cdca3dc8d6167cd4 X-Google-Attributes: gidfdb0e,public X-Google-Thread: f7344,a808e23c428d1184 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,cdca3dc8d6167cd4 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2002-01-01 07:49:09 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!conan.ids.net!zarlenga From: Michael Zarlenga Newsgroups: comp.os.vms,alt.sys.pdp10,comp.sys.dec Subject: Re: historical evidence of what went wrong at DEC Date: Tue, 01 Jan 2002 15:49:08 -0000 Message-ID: References: <3roT7.207043$tf5.13617499@bin5.nnrp.aus1.giganews.com> <3C2D48CE.FA4FF25A@fsi.net> <3C2EA123.ECBCDB31@fsi.net> <3C31097A.8DEB4909@fsi.net> User-Agent: tin/pre-1.4-980818 ("Laura") (UNIX) (FreeBSD/3.1-RELEASE (i386)) X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.os.vms:57625 alt.sys.pdp10:8951 comp.sys.dec:10670 In comp.os.vms David J. Dachtera wrote: :> : Use GOSUB instead then. You can't pass parameters on the GOSUB :> : statement, but all local and global symbols are "visible" regardless of :> : the GOSUB depth. CALL is like "@" - it creates a new procedure depth. :> :> The benefits of functions come directly from the ability :> to have calling arguments and return values, otherwise, we :> would all just use global variables and gotos in C. : In Macro (VAX Assembler - its a "3"GL on Alpha, sort of), you push the : address or value of an argument or the address of an argument block onto : the stack, then branch to the subroutine (usually via a CALLG, CALLS or : similar). What's easier to read and support? Code like that? Or code where the arguments and return values are passed thusly : x = func(a,b); :> :> Toss in the ability to include other .ksh code into the :> :> current .ksh program as code and you have a much more power- :> :> ful scripting language. :> :> : Can you provide an example? Your explanation is confusing. :> :> . mystuff.ksh : I'm sure that means something to well-seasoned UN*X folks. I'll need a : deeper explanation of the mechanism before it completely makes sense. Similar to DCL's @, in that the code in mystuff.ksh executes in the current process shell. Dissimilar in that function definitions, calls, variables , etc, are processed almost as if the code in mystuff.ksh were inserted there. -- -- Mike Zarlenga