Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!cmcl2!lanl!jlg From: jlg@lanl.ARPA (Jim Giles) Newsgroups: net.lang Subject: Re: [Really: C builtin functions?] Message-ID: <2040@lanl.ARPA> Date: Fri, 18-Apr-86 19:29:16 EST Article-I.D.: lanl.2040 Posted: Fri Apr 18 19:29:16 1986 Date-Received: Sun, 20-Apr-86 17:09:45 EST References: <443@3comvax.UUCP> <7900003@ztivax.UUCP> Reply-To: jlg@a.UUCP (Jim Giles) Organization: Los Alamos National Laboratory Lines: 42 Keywords: C In article <149@diablo.ARPA> avg@diablo.UUCP (Allen VanGelder) writes: >I think there may be a confusion in terminology between built-in and >in-line. In FORTRAN, MAX is expanded in-line, so you always get >FORTRAN's MAX. But SIN is not, and if you jiggle your libraries >properly you will get your personal SIN function. The same is true >for READ and WRITE in FORTRAN. Actually, you CAN get your own MAX function from Fortran. All you do is type : EXTERNAL MAX . . I=MAX(A) ... Then you provide your own MAX function in a library that's searched before the system default library is searched. Furthermore, you can declare MAX to be a local variable: REAL MAX(0:500) ... In fact, if you use MAX in a way that is not syntactically the same as a function reference, Fortran will automatically declare a variable of the appropriate type (subject to the requirements of the IMPLICIT statement). ... MAX=5 ... In Fortran, ALL identifiers can be redefined by the user (there are some reserved keywords - they are too long to be identifiers, this will change with 8x which allows 31 character identifiers). It could be worse - it could be PL-I with conditional expressions: I=if if then then else else; /* or something like this! Bletch. J. Giles Los Alamos