Recent

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

incendio

  • Jr. Member
  • **
  • Posts: 95
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: 2262
  • 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