Re: What does an "export" do?

From: Dan Mercer (dmercer_at_mn.rr.com)
Date: 01/26/05


Date: Wed, 26 Jan 2005 14:52:19 GMT


"Barry Margolin" <barmar@alum.mit.edu> wrote in message news:barmar-5CB325.01142626012005@comcast.dca.giganews.com...
: In article <kjsJd.225201$ye4.140349@twister.rdc-kc.rr.com>,
: "Dan Mercer" <dmercer@mn.rr.com> wrote:
:
: > "Kevin Rodgers" <ihs_4664@yahoo.com> wrote in message
: > news:35lig4F4q8ossU2@individual.net...
: > : Dan Mercer wrote:
: > : > "PM" <pm@gmx.de> wrote in message news:35l3vlF4osk4nU1@individual.net...
: > : > : Prab_kar@hotmail.com wrote:
: > : > : > In general, why do I need to export a variable?
: > : > To get it in called processes envp stack.
: > :
: > : In what way is envp a stack?
: >
: > The arguments and the environment are stacked in the same contiguous
: > space. Too many env vars and you may have no room to pass args.
: > Older versions of the Bourne shell also stored function definitions
: > in the environment space, so if you had a sufficiently large number
: > defined you also had trouble passing args.
:
: You seem to be using "stack" in a way different from most programmers.
: A stack is a data structure that allows you to add items at one end, and
: then retrieve them in the reverse order that they were added. The term
: is an analogy for the stack of plates in a buffet restaurant, where the
: staff adds new plates to the top and then customers take them off.
:

It's a hangover from learning UNIX on an Amdahl UTS system running under
IBM's VM/CMS. Using a 3270 terminal, no less. 3270's got a screen at
a time and the screen blinked with every transmission. So, since stderr
flushes after every byte you'd see:

    $ ls *
    $ls *
    l
BLINK
    $ls *
    ls
BLINK
    $ls *
    ls:
BLINK
     $ls *
    ls:
BLINK
     $ls *
    ls: *
BLINK

Well, you get the picture. You rapidly learned to do many things differently.

Anyways, the documentation borrowed terms from IBM mainframe
terminology, and, living fossil that I am, I never changed. Sometimes
I feel like a Coelacanth.

Dan Mercer

: --
: Barry Margolin, barmar@alum.mit.edu
: Arlington, MA
: *** PLEASE post questions in newsgroups, not directly to me ***



Relevant Pages

  • Re: Command terminated by signal 9
    ... Dan Mercer wrote: ... The quicker method of determining whether that was the cause is to ... > blew out the stack on HP-UX before I convinced the powers that be to ...
    (comp.unix.programmer)
  • Re: Local variables controversial?
    ... >>The leave-frame can also check to see if you underflowed the data stack ... > I would much prefer that you not confuse terminology ... IMMEDIATE word) such as tidying up locals, ... Given that PagCal's compiler is a C-like-syntax compiler with Forth as ...
    (comp.lang.forth)
  • Re: When is a stack used in real life?
    ... What you really want for plates is ... > My socks form a mathematical set in that no two are alike. ... > stack, the plate is still warm and wet from its washing. ... > dishwashers are out back for a smoke, ...
    (comp.programming)
  • Re: pop/push, shift/unshift
    ... and it's taking a surprising amount of time to "grok" them. ... The way I think of a stack is as, literally, a stack of plates. ...
    (comp.lang.ruby)
  • Re: Stack of 7-10 plates
    ... I need to make a "large run" of mounting plates - for me that means more ... sets of related holes. ... Would you stack, clean up the edges, drill the holes (they need to be ... then separately do the counter sinking on a drill press? ...
    (rec.crafts.metalworking)