Xref: utzoo comp.lang.c:11034 comp.lang.fortran:853 Path: utzoo!attcan!uunet!nbires!ncar!noao!arizona!mike From: mike@arizona.edu (Mike Coffin) Newsgroups: comp.lang.c,comp.lang.fortran Subject: Re: Mathematical expression syntax (was: C vs. Fortran) Message-ID: <6065@megaron.arizona.edu> Date: 30 Jun 88 23:43:18 GMT References: <20509@beta.lanl.gov> Organization: U of Arizona CS Dept, Tucson Lines: 30 From article <20509@beta.lanl.gov>, by jlg@beta.lanl.gov (Jim Giles): > Mathematics texts don't have flow control problems to deal with. As > a result, they never invented a standardized syntax for it. The parts > of Fortran which represent scalar mathematical expressions do a > creditable job of keeping to traditional mathematical syntax. Hmmm. Plus, minus, divide, and parenthesis are used in pretty much the same way. In traditional mathematics, multiplication is usually represented by adjacency (sometimes a dot or a cross), square roots by a root sign, absolute values by vertical bars, complex numbers as in (3+4i), inequalties by < and > (not .LT. and .GT.), ... the list could be extended indefinitely. And at least one symbol, =, is used in a decidedly nontraditional way. (Can you imagine Gauss or Euler uttering "a = a + 1"?). I'm not saying this is all bad. In fact, you hit the nail on the head: mathematics texts don't have to deal with flow control, while programming languages (at least imperative ones) deal with almost nothing else. There has never been a standard way to present algorithms; often they end up as numbered steps interspersed with natural-language instructions. -- Mike Coffin mike@arizona.edu Univ. of Ariz. Dept. of Comp. Sci. {allegra,cmcl2,ihnp4}!arizona!mike Tucson, AZ 85721 (602)621-4252