Path: utzoo!mnetor!uunet!steinmetz!davidsen From: davidsen@steinmetz.steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.arch Subject: Re: FORTRAN Horror Message-ID: <10037@steinmetz.steinmetz.ge.com> Date: 22 Mar 88 17:20:02 GMT References: <24861@yale-celray.yale.UUCP> <1135@pembina.UUCP> <2424@saturn.ucsc.edu> <25461@yale-celray.yale.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 22 The arithmetic if is one of the few good things in FORTRAN, and one I miss in C every time I write some form of sort or tree search. There is no clean way to do what the IF allows, ie. to make two conditional jumps based on a single compare instruction. Yes, I know it's not a big overhead in the scheme of things, but the IF is a representation of something which you really want to do in useful programs. Of course I wouldn't suggest having it be implemented as goto's, but some reasonable syntax, such as: evaluate (fun(4,"test") < 22) { < 0 action } { equal action } { > 0 action } I am not really suggesting adding this to any language, but it allows telling the compiler what you want in a way which allows generation of good code. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs | seismo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me