Recent

Author Topic: Set type parameter  (Read 1948 times)

jamie

  • Hero Member
  • *****
  • Posts: 6091
Re: Set type parameter
« Reply #15 on: March 20, 2023, 03:22:30 am »
As a matter of fact you always need to specify a data type name (for value and variable parameters); “anonymous” data types are not permitted in the formal parameter list. The FPC – as extension – just allows (“open”) array of …, too, as you can see in the syntax diagram.

 I can't just pass anything?  %)

Code: Pascal  [Select][+][-]
  1. MyFunction(Var SomeName):SomeReturnTypeMaybe;
  2.  

With that, I can pass anything!  :D
The only true wisdom is knowing you know nothing

Kays

  • Hero Member
  • *****
  • Posts: 569
  • Whasup!?
    • KaiBurghardt.de
Re: Set type parameter
« Reply #16 on: March 21, 2023, 02:37:11 pm »
That is actually a really cool syntax, sadly it is not used anymore
I’m not sure, but I think it hardly gained popularity in the first place, so saying “not used anymore” is a bit of a misrepresentation. I know the GPC (GNU Pascal Compiler) and Prospero Pascal supported it.
With that, I can pass anything!  :D
Touché.
Yours Sincerely
Kai Burghardt

 

TinyPortal © 2005-2018