Recent

Author Topic: Overloaded function not working in objfpc ?  (Read 677 times)

process_1

  • Guest
Re: Overloaded function not working in objfpc ?
« Reply #15 on: August 01, 2020, 12:10:33 pm »
Actually, I do not think using Delphi mode is great loss. It is just about syntax. The most obvious difference is when declare dynamical lib calls declaring pointers to functions from it.

BTW, using function name is Wirth's decision, I have found his old document from 1971:

https://oberoncore.ru/_media/library/wirth_the_programming_language_pascal.pdf

Thaddy

  • Hero Member
  • *****
  • Posts: 10293
Re: Overloaded function not working in objfpc ?
« Reply #16 on: August 01, 2020, 12:24:19 pm »
mea culpa: my test does not print version1 which it should too It should print both lines.
I am more like donkey than shrek

PascalDragon

  • Hero Member
  • *****
  • Posts: 1958
  • Compiler Developer
Re: Overloaded function not working in objfpc ?
« Reply #17 on: August 01, 2020, 05:39:28 pm »
mea culpa: my test does not print version1 which it should too It should print both lines.

It will not in mode ObjFPC. That's independant of the platform and by design.

MarkMLl

  • Hero Member
  • *****
  • Posts: 1108
Re: Overloaded function not working in objfpc ?
« Reply #18 on: August 01, 2020, 06:34:56 pm »
BTW, using function name is Wirth's decision, I have found his old document from 1971:

https://oberoncore.ru/_media/library/wirth_the_programming_language_pascal.pdf

That document is of historical interest, but cannot be considered useful comment on the language "as she is spoke". For example:

"In order to eliminate side-effects, assignments to non-local variables are not allowed to occur within the function."

Watch out for another early version of that document which allows /* */ as digraphs for { }.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

process_1

  • Guest
Re: Overloaded function not working in objfpc ?
« Reply #19 on: August 01, 2020, 10:12:47 pm »
That document is of historical interest, but cannot be considered useful comment on the language "as she is spoke".

Well, don't forget these are pioneer days. As well now seems funny to have A,B,C,D... languages, is it? But in these days...

As well, one man hardly could find better solution, as fortran like RETURN [whatewer] statement is not in the language spirit at all...

VTwin

  • Hero Member
  • *****
  • Posts: 916
  • Former Turbo Pascal 3 user
Re: Overloaded function not working in objfpc ?
« Reply #20 on: August 01, 2020, 11:46:51 pm »
BTW, using function name is Wirth's decision, I have found his old document from 1971:

https://oberoncore.ru/_media/library/wirth_the_programming_language_pascal.pdf

I like his statement "In view of its intended usage both as a convenient basis to teach programming and as an efficient tool to write large programs...". Pascal is often dismissed as a "teaching" language, as if that is a bad thing.
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.8 (64 bit Cocoa, also fixes and trunk)
Ubuntu 18.04.3: Lazarus 2.0.8 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.8 (64 bit on VBox)

 

TinyPortal © 2005-2018