Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclcdb!cdb From: cdb@hpclcdb.HP.COM (Carl Burch) Newsgroups: comp.lang.fortran Subject: Re: fortran statement Message-ID: <6690027@hpclcdb.HP.COM> Date: 30 Jul 89 20:18:30 GMT References: <28605@beta.lanl.gov> Organization: Hewlett-Packard Calif. Language Lab Lines: 22 > IF(MOD(N,2).EQ.0)THEN > I'm new at the language and was looking over a program written as an > example and became quite confused when I read MOD what does it signify > in this statement there is no other reference to MOD... Short answer : This is FORTRAN 77 for (in Pascal) : IF odd(N) THEN Longer answer : MOD is the modulus (like remainder if all arguments are positive) function. It is an intrinsic function in FORTRAN 77, so no other references are necessary. The remainder of any even positive number divided by two is zero. I hedge by restricting the above to the positive case because what happens when either argument is negative is the subject of many theological arguments I do not desire to join. Carl Burch HP Data and Languages Division