Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site oliveb.UUCP Path: utzoo!linus!decvax!ittvax!qumix!qubix!ios!oliveb!jerry From: jerry@oliveb.UUCP (Jerry Aguirre) Newsgroups: net.lang.c Subject: Re: on1 construct Message-ID: <216@oliveb.UUCP> Date: Wed, 7-Nov-84 15:03:38 EST Article-I.D.: oliveb.216 Posted: Wed Nov 7 15:03:38 1984 Date-Received: Sat, 10-Nov-84 03:28:11 EST References: <124@cadvax> Organization: Olivetti ATC, Cupertino, Ca Lines: 20 How about: #define on1(X) static char first_time_in = TRUE; if ((first_time_in) && (!(first_time_in = FALSE))) function () { on1() { bla; bla; ... }; etc... } The evaluation of the && will reset the flag the first time thru. Because the reseting is done as part of the test the braced part of the code is not affected. Jerry Aguirre @ Olivetti ATC {hplabs|fortune|idi|ihnp4|ios|tolerant|allegra|tymix}!oliveb!jerry