Recent

Author Topic: Factorial  (Read 2795 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Factorial
« Reply #30 on: February 06, 2024, 09:48:40 pm »
The absolute value function is included because it is part of the language. There was no (FPC‑internal) deliberation process for including or excluding it.

That's an important point, IMO.

There's at least four levels here:

* Stuff Wirth put into the language and mandated library.

* Stuff added very early on by UCSD, Borland and ISO which defines Turbo Pascal.

* Stuff added by Delphi which defines Object Pascal.

* Stuff added by FPC.

There isn't a standard Factorial() function (or ! postfix operator) in any of those. If it can be done using a function with a non-obvious name, then it becomes a "the documentation doesn't tell me how to do this" problem.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018