Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!boulder!hao!oddjob!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.lang.fortran Subject: Re: Value parameters Message-ID: <9132@mimsy.UUCP> Date: Wed, 28-Oct-87 03:25:51 EST Article-I.D.: mimsy.9132 Posted: Wed Oct 28 03:25:51 1987 Date-Received: Sat, 31-Oct-87 01:29:05 EST References: <1331@cartan.Berkeley.EDU> <50500013@uxe.cso.uiuc.edu> <398@mn-at1.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 34 In article <398@mn-at1.UUCP> alan@mn-at1.UUCP (Alan Klietz) writes: >An expression is a constant syntactical entity, so it should be possible >to detect the attempt at load time. Not so. Consider the following example: C I cannot stand all caps, so this is all lowercase subroutine sub(x, isexp) real x logical isexp real v C compute something based on x v = ... if (.not. isexp) then C reassign x x = v endif ... end A conformant program will then give `true' for `isexp' whenever the value passed in as `x' is an expression, not a simple variable. (It has been several years since I wrote any Fortran; apologies for any bugs in the example above.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris