Recent

Author Topic: What is the equivalent div_t in Lazarus?  (Read 1305 times)

incendio

  • Sr. Member
  • ****
  • Posts: 269
What is the equivalent div_t in Lazarus?
« on: January 31, 2020, 08:42:24 am »
Hi guys,

What's div_t command in Lazarus & in which unit this command exists?

julkas

  • Guest
Re: What is the equivalent div_t in Lazarus?
« Reply #1 on: January 31, 2020, 08:58:08 am »
Hi guys,

What's div_t command in Lazarus & in which unit this command exists?
https://www.freepascal.org/docs-html/rtl/math/divmod.html

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: What is the equivalent div_t in Lazarus?
« Reply #2 on: January 31, 2020, 09:18:34 am »
What's div_t command in Lazarus & in which unit this command exists?

div_t is not a command, but a struct. The corresponding C function is div. And as such julkas is right in pointing to DivMod in unit Math, though contrary to C's div this returns the Result and the Remainder as var parameters.



 

TinyPortal © 2005-2018