Quotient / Mod Function

Get help with using AutoHotkey and its commands and hotkeys
1100++
Posts: 78
Joined: 10 Feb 2018, 19:05

Quotient / Mod Function

11 Jul 2018, 15:11

I remember there being a Windows API function that computes the quotient and remainder of the division of two integers. Does such a function exist, and, if so, can someone tell me what it is?
gregster
Posts: 5836
Joined: 30 Sep 2013, 06:48

Re: Quotient / Mod Function

11 Jul 2018, 15:15

I don't know the Windows API function, but in AHK we have floor division, as you already know, and of course modulo, which will return the remainder: https://autohotkey.com/docs/commands/Ma ... ion_Modulo

Of course, with these you could create your own user function that does what you are looking for... you just have to decide how you want the result: An array as return value or perhaps byref variable(s)?
Last edited by gregster on 11 Jul 2018, 15:44, edited 1 time in total.
gregster
Posts: 5836
Joined: 30 Sep 2013, 06:48

Re: Quotient / Mod Function

11 Jul 2018, 15:36

There is also this: https://msdn.microsoft.com/de-de/librar ... .110).aspx
(From your original question it wasn't clear to me if you were looking for this or if you asked if such a function alreday exists in AHK...)

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], roysubs and 59 guests