NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Pascal - MOD help needed

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 05-29-2007, 02:37 PM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: Dec 2004
Location: Ireland
Posts: 2,690
Joseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond reputeJoseph has a reputation beyond repute
 


Animal Cruelty 9/11/01 :: Never Forget Find Marrow Donors! Save The Children Save The Children Save The Children Ethan Allen Fund Baby Health Child Abuse Cancer AIDS/HIV Autism Autism Lou Gehrig's Disease (ALS) Parkinson's Disease Alzheimer's Cancer Save a Life Cancer Cancer Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009

Pascal - MOD help needed


Hey,

I have a test tomorrow on pascal and can't quite grasp the MOD function in pascal.

-100 MOD 8 = -4

I thought it was the remainder? -100/8 = 12.5 answer = 5?

Can someone clarify?
Joseph is offline  
Old 05-29-2007, 06:08 PM   #2 (permalink)
Tech Support
Join Date: Mar 2005
Posts: 4,944
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Maybe this would help? http://www.merlyn.demon.co.uk/pas-math.htm#DivMod
Eric is offline  
Old 05-30-2007, 12:43 PM   #3 (permalink)
New Member
Join Date: Mar 2007
Posts: 16
samuofm is an unknown quantity at this point
 



that link is kinda crptic.

MOD ( % ) is just remainder when you do long division.

so 13 % 10 is 3 (because 13 divided by 10 is 1 remainder 3)
and 5 % 2 is 1 (because 5 divided by 2 is 2 remainder 1)

MOD has lots of uses, for example it can test to see if a number is even or odd

if ( variable % 2 == 0) number is even


i took pascal in junior high, i cant believe they still teach it. Good luck mate.



(in your example, remember there are no decimals in long division)
samuofm is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:20 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger