delorie.com/archives/browse.cgi | search |
From: | wemccaug AT prairienet DOT org (Wendy E. McCaughrin) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: "mod" in Pascal equivalent to %?? |
References: | <7uamr7$ot8$1 AT ctb-nnrp2 DOT saix DOT net> |
Lines: | 34 |
Message-ID: | <Lb7O3.99$Ak5.42@firefly> |
Date: | Sat, 16 Oct 1999 22:42:51 GMT |
NNTP-Posting-Host: | 192.17.3.4 |
X-Complaints-To: | newsmgr AT prairienet DOT org |
X-Trace: | firefly 940113771 192.17.3.4 (Sat, 16 Oct 1999 17:42:51 CDT) |
NNTP-Posting-Date: | Sat, 16 Oct 1999 17:42:51 CDT |
Organization: | Prairienet -- Your Community Network for East Central Illinois |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
In a previous article, rylan AT intekom DOT com ("Stefan Viljoen") says: >Hi All, > >Am I correct in the assumption that the DJGPP (or C?) equivalent for the >"mod" that you find in say, this line of Pascal > >total := whatever mod sum; > >is > >total = whatever % sum; > >Is this correct? Is "%" equivalent to "mod" (modulo?) If not, what is >equivalent? > >Fanx! > Yes, both `mod' and % should return the remainder upon integer division of whatever by sum. You might want to check what happens when either dividend or divisor is negative, and what happens when sum = 0 in both cases. >-- >This message courtesy of >RylanNet rylan AT intekom DOT co DOT za >http://home.intekom.com/rylan/ >-- >StarWars for ever!. > > >
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |