
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
A hard working student,. [EMAIL PROTECTED] (KELLIE FITTON) Date: 10/1/03 12:08 PM EST Message-id: <[EMAIL PROTECTED]> Writes: << Hello everyone, according to the cobol book that I am reading, some Submodules that are called in the computer's open environments memory that have "active components" or "Java applets" can overwrite the working areas of my programs or even clobber the global variables. Is there a way to protect my cobol's working area? should I use win32 APIs to LOCK the memory heaps? should I get a german shepherd? thanks a lot for your kind help, Kellie. >> As you know by default, COBOL passes values BY REFERENCE. USING clauses can be coded to achieve passing BY VALUE, as well (that is fairly recent in COBOL). You may wish to take note of Standford Artificial Intelligence Laboratory, October 1973, Memo AIM 224 Computer Science Department Report No CS-403 "Hints on Programming Language Design" By C. A. R. Hoare "Section. 8 Variables" (snips) An assignment to x "... if x is a reference variable may change any other variable (of appropriate type) in the whole machine. "" (snips, then at the end of the section) "References are like jumps, leading wildly from one part of a data structure to another. Their introduction into high level languages has been a step backward from which we may never recover." The early languages of interest to Hoare had parameter passing by value, by reference and a thing they called BY NAME. Phrases similar to BY NAME can mean different things. I am a student of ALGOL and not an experienced practitioner. My summary of an ALGOL parameter passed BY NAME is that it is a two level reference. The problem this solved was that things could move, so if you had a mere reference, the thing you want might not be there anymore. Imagine shopping carts at an online bookstore, either your cart has moved to a new 'service station', or the cart at the station of interest is the next cart instantiation. They did try to achieve what they called pseudo parallel systems with the work leading from ALGOL to SIMULA. So the ALGOLites used a pass BY NAME feature to pass you a reliable indication of where yet another pointer was. And you would have to double dereference you pointer to pick up the real intended data. Hoare thought even less of BY NAME than of BY REFERENCE. There is another factor of early concepts that shows up in the cited paper. Early work in some cases tried to make subroutines as pure functions. This seems esoteric at first, a silly, boring distinction that is now actually rare and seems not related to COBOL or business. Yet it is really quite important if you want to understand the departure that was occuring that caused Hoare so much concern. (That departure now has arrived at a net that connects very untrustworthy individuals to business data storage). Some uses of the term 'function' are very restricted. The word can mean something like a sub program that we call. But the code is not allowed to have any 'side effects.' For the sake of introducing the idea and relating it to german shepherds. A side effect is simply any permanent record of the execution of the code in the sub module, like a move of a value to memory. So you will occassionaly encounter this use of the term function. The only thing that happens in a 'function' is that it returns its value. This is still a very power theme in some development environments. The gist of this thing is that they wanted to extend mathematical formulas beyond the simple arithmetic type operators. Functions were engaged to do calcs, these were not so much means to structure a system by modularizing it. So Hoare's view of the 'interface' into a submodule is somewhat influenced by a residual orientation to that kind of purpose. >From that earlier perspective, miscreant active attachments that interrogate your Windows mailing lists and audaciously emit flurries of wormy cyberbytes out onto the net seem gastly indeed. Worms are geometrically expanding side effects. Gastly, but to Hoare, maybe not such a surprise. It is noteworthy that the title page to Hoare's published notes indicate Supported By Advanced Research Projects Agency ARPT Order No 24y4 Project CODE 3d30 Maybe the title of the quoted section should have been "References Considered Harmful." Best Wishes Bob Rayhawk [EMAIL PROTECTED]
| <-- __Chronological__ --> | <-- __Thread__ --> |