delphi911 0 Posted February 3, 2011 Report Share Posted February 3, 2011 I need to perform a modula operation. I need this; Number MOD 2 if the result equal to zero I will perform something. So how can I perform a MOD function. PS : It is possible to define a mod function as a mod n = a - (n * int(a/n)) Is there an int function? Quote Link to post Share on other sites
delphi911 0 Posted February 3, 2011 Author Report Share Posted February 3, 2011 I will answer my own question in case someone needs this info. Infact the answer is very simple. Just use % as the operator ex: 5 % 3 in eval function will give you 2. Quote Link to post Share on other sites
UBotBuddy 331 Posted February 3, 2011 Report Share Posted February 3, 2011 I did not think anyone ever used that MOD function except way back in the BasicA days. lol Quote Link to post Share on other sites
delphi911 0 Posted February 3, 2011 Author Report Share Posted February 3, 2011 I did not think anyone ever used that MOD function except way back in the BasicA days. lol Me too. But I need something like this. There are two different txt file. I have to make a third one using them. Like this; File1 : aaaabbbbccccdddd File2 :11112222 The One I will build;aaaa,1111bbbb,1111cccc,2222dddd,2222 By using mod, I am able to match them like this. Do you have any suggestions other than using mod? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.