Xref: utzoo comp.edu:3737 uw.general:2010 Path: utzoo!attcan!uunet!samsung!dali.cs.montana.edu!milton!Tomobiki-Cho!mrc From: mrc@Tomobiki-Cho.CAC.Washington.EDU (Mark Crispin) Newsgroups: comp.edu,uw.general Subject: Re: Recursion Summary Message-ID: <10143@milton.u.washington.edu> Date: 29 Oct 90 04:52:36 GMT References: <1990Oct23.211651.10227@contact.uucp> <9868@milton.u.washington.edu> <9882@milton.u.washington.edu> <1990Oct25.160014.17216@watdragon.waterloo.edu> Sender: news@milton.u.washington.edu Distribution: na Organization: Mendou Zaibatsu, Tomobiki-Cho, Butsumetsu-Shi Lines: 24 In article <1990Oct25.160014.17216@watdragon.waterloo.edu> bpdickson@rose.uwaterloo.ca (Brian Dickson) writes: >>Recursion is nothing more a reentrant subroutine call. >Error #1: reentrant subroutine call == recursion >Example: inexperienced FORTRAN programmer writes recursive program, > wonders why weird things happen. (I observed this one.) :-( Fortran subroutines are non-reentrant, although there is no error check for subroutine call reentrancy. Some Fortran compilers generate subroutine calls using a JSR-type machine instruction that stores the return PC in a static location (e.g. the first location of the subroutine) and return by an indirect-jump on that static location. Other compilers may use a stack subroutine-call instruction, leading to a false notion that Fortran has "reentrancy". _____ | ____ ___|___ /__ Mark ("Gaijin") Crispin "Gaijin! Gaijin!" _|_|_ -|- || __|__ / / R90/6 pilot, DoD #0105 "Gaijin ha doko?" |_|_|_| |\-++- |===| / / Atheist & Proud "Niichan ha gaijin." --|-- /| |||| |___| /\ (206) 842-2385/543-5762 "Chigau. Gaijin ja nai. /|\ | |/\| _______ / \ MRC@CAC.Washington.EDU Omae ha gaijin darou" / | \ | |__| / \ / \"Iie, boku ha nihonjin." "Souka. Yappari gaijin!" Hee, dakedo UNIX nanka wo tsukatte, umaku ikanaku temo shiranai yo.