Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!pasteur!ucbvax!van-bc!rsoft!mindlink!a464 From: a464@mindlink.UUCP (Bruce Dawson) Newsgroups: comp.sys.amiga.tech Subject: Re: Fonts and freeing memory Message-ID: <956@mindlink.UUCP> Date: 16 Jan 90 17:12:02 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 16 Ignoring the fact that OpenFont() is NOT needed before a call to OpenDiskFont(), there is nothing wrong with the following code: if (!(winfont = (struct TextFont *)OpenFont(&ta)) && !(winfont = (struct TextFont *)OpenDiskFont(&ta))) blah blah it didn't work. C _guarantees_ that the first expression will be evaluated first. Furthermore, it guarantees that if the first expression fails, the second expression will not be executed at all. If you look at K&R, you will find some programs that _depend_ on this for proper execution. However, as has been pointed out, from an Amiga point of view that code is bunk, because the call to OpenFont() isn't necessary. .Bruce.