Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site rabbit.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!rabbit!rob From: rob@rabbit.UUCP Newsgroups: net.unix Subject: Commentary Message-ID: <2967@rabbit.UUCP> Date: Fri, 13-Jul-84 15:49:55 EDT Article-I.D.: rabbit.2967 Posted: Fri Jul 13 15:49:55 1984 Date-Received: Sat, 14-Jul-84 01:43:04 EDT Organization: AT&T Bell Laboratories, Murray Hill Lines: 47 Sorry; i repent. here is an improved version of one of the hoc routines, to set a new style of example. Here is the original: bltin() { Datum d; d = pop(); d.val = (*(double (*)())*pc++)(d.val); push(d); } And the improved version: /******************************************************************************** * * * * * bltin * * * * * ********************************************************************************/ /* * Evaluate a built-in */ bltin() /* Declare the function */ { Datum d; /* Declare the variable d of type Datum */ d = pop(); /* Call pop() and place the result in d, which was (conveniently) already declared */ /* * This is the clever part */ d.val = (*(double (*)())*pc++)(d.val); /* * Whew! that was hard. */ push(d); /* Return a result */ } /******************************************************************************** * * * * * end of bltin * * * * * ********************************************************************************/