Article View: comp.lang.misc
Article #93Re: Modula-3, Fortran, Numbers & Aliens
From: Raul Deluth Miller-Rockwell
Date: Tue, 07 Apr 1992 05:54
Date: Tue, 07 Apr 1992 05:54
56 lines
3030 bytes
3030 bytes
Stephen P Spackman: ... you have just substituted the words "programme text" and "routine" for "scope". What do these things look like? What is the actual domain of the definition? I'm not sure I understand the questions. J hasn't been around long enough for there to be a particular definition style. For example, a style which uses a separate file for each function definition would look quite different than a style which uses scripts, with literal text quoted in-line. The first would look somewhat like a c program with various modules and a makefile, the second would look somewhat like a shar archive (or, perhaps, a bit cleaner). And if the user is driving the definition process from emacs, they'll just look like text. And, there are other definition styles. If by "domain of the definition" you mean the domain of the thing which is defined, well, that depends on the definition. Domain, in this sense, is more or less independent of the mechanisms used for definition. Oh, I realise there's still a missing piece of info: if you use =: in a scope that has introduced a new name textually identical to that on the left of the assignment, what gets updated? The local, the global, or both? If you are really LEXICALLY scoped, it ought to be the local, but what if that defining scope has already exited? Is that handled correctly? Well, the global definition is updated. If you want the local definition to be updated you can use '=.' If there is some local definition shadowing the global definition, you can always create a new context where the local definition does not exist. I might define an example of this as follows: example =. (here_is '.') : '' . test=. 3 . test=: 4 . 'local ' label test . 'global ' label 'test':'' 0 . NB. return an empty result Then, if I used example 0 The routine would display: local 3 global 4 And, on exit, 'test' would have the value 4 By the way, I'm presuming that the definitions of 'here_is' and 'label' are not pertinent to this discussion. Also, 'NB.' introduces a comment. -- Raul Deluth Miller-Rockwell <rockwell@socrates.umd.edu>
Technical Details
Message-ID:
<ROCKWELL.92Apr7005432@socrates.umd.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!socrates!socrates!rockwellReferences:
<1992Mar15.221628.24491@yrloc.ipsa.reuter.COM> <ks8boqINN8ht@network.ucsd.edu> <ROCKWELL.92Mar31185022@socrates.umd.edu> <1992Apr3.172844.6152@newshost.lanl.gov> <ROCKWELL.92Apr4080945@socrates.umd.edu> <STEPHEN.92Apr4215253@estragon.uchicago.edu> <R <STEPHEN.92Apr5185547@estragon.uchicago.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!socrates!socrates!rockwell From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) Subject: Re: Modula-3, Fortran, Numbers & Aliens In-Reply-To: stephen@estragon.uchicago.edu's message of 5 Apr 92 23:55:40 GMT Message-ID: <ROCKWELL.92Apr7005432@socrates.umd.edu> Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) Organization: Traveller References: <1992Mar15.221628.24491@yrloc.ipsa.reuter.COM> <ks8boqINN8ht@network.ucsd.edu> <ROCKWELL.92Mar31185022@socrates.umd.edu> <1992Apr3.172844.6152@newshost.lanl.gov> <ROCKWELL.92Apr4080945@socrates.umd.edu> <STEPHEN.92Apr4215253@estragon.uchicago.edu> <R <STEPHEN.92Apr5185547@estragon.uchicago.edu> Date: Tue, 7 Apr 1992 05:54:32 GMT