Msg: 4299 *Conference*
05-05-93 09:45:36
From: DREW BLANCHAR
To : CARROLL LEWIS
Subj: REPLY TO MSG #4296 (MOD)
Ah! MOD one of the commands that some writers didn't think the MDL 100 could do MOD MOD gives you the remainder after integer division huh? OK..your example.....x1 = 300 MOD 256 x1 = 44 because 300/256 = 1 with a remainder of 44 try PRINT 300 MOD 7 and you'll get 6 because 300/7 = 42 with a remainder of 6 try simpler stuff like 35 MOD 8 and you should get 3 MOD is easier than X - (Y*(FIX(X/Y))) to get the remainder sometimes you want the fraction, or the cents, or the remainder (like when you're converting decimal to binary) Show me a program to take a decimal number X between 0 and 255 and display it in binary 0000 0000 to 1111 1111. -Drew