Pascal programming and numeric stuff

Dramen

New Member
I'm studying Pascal right now and have numeric dyslexia so have a limited knowledge of mathematical concepts etc, and most of the programs I have to write involve simple arithmetic.

I know that div is divide but can anyone tell me what "mod" means?

I'll write a bit of the program just to show it's context cos I don't have a clue what it means. It's for a time conversion equation using procedures etc.

tCHours := tCTotalSeconds div 3600;
temp := tCTotalSeconds mod 3600;
tCMinutes := temp div 60;
tCSeconds := temp mod 60;
 
It's the ramainder that you get in division.
Example:
What is 9 mod 4:

Answer:
9 divide by 4 = 2 remainder 1

So 9 mod 4 = 1
 
Back
Top