Path: utzoo!utgpu!attcan!uunet!husc6!uwvax!speedy!engber From: engber@speedy.cs.wisc.edu (Mike Engber) Newsgroups: comp.sys.mac.programmer Subject: Re: what the heck is "reentrant"? Summary: static variables make a function non-reentrant Message-ID: <6100@spool.cs.wisc.edu> Date: 5 Aug 88 15:15:52 GMT References: <730049@hpcilzb.HP.COM> <104700046@p.cs.uiuc.edu> Sender: news@spool.cs.wisc.edu Reply-To: engber@speedy.cs.wisc.edu (Mike Engber) Organization: U of Wisconsin CS Dept Lines: 16 In article <104700046@p.cs.uiuc.edu> gillies@p.cs.uiuc.edu writes: > >Here are a few common ways to make something NON-reentrant: >... An even simpler way to make a funtion NON-reentrant is to use static variables. Sometimes this is desired, like with a random number generator. I've also heard that a lot of old Fortran progams rely on the fact that their compilers do not generate reentrant code (i.e. they rely on all variables being static) and that this is the main obsticle keeping the Fortran standard from allowing recursion. -ME