Author Topic: MODE ISO:Wrong number of parameters specified for call to "<Procedure Variable>"  (Read 908 times)


  • New Member
  • *
  • Posts: 29
Hi Thaddy,
I do not think, that the last case has to be closed by a semicolon.
This compiles w/o a flaw! The semicolon before the "end" is optional, not mandatory.
The semicolon seperates cases, it is not a part of a case.
Code: Pascal  [Select][+][-]
  1. {$MODE ISO}
  2. program ow;
  3. begin
  4.    case 5 of
  5.       1, 2, 3:
  6.    end
  7. end.


  • Hero Member
  • *****
  • Posts: 10582
Well, I do not have P5 at hand right now, (I am busy) but for sure it should fail that code since you specify two paths in the original code.
Also, a case should have defined execution paths and it is not the colon, but the semi-colon that separates the paths.
Try P5 yourself, it is a 30 seconds or less compile even on slow hardware..
« Last Edit: September 24, 2020, 01:28:11 pm by Thaddy »


  • Hero Member
  • *****
  • Posts: 2424
  • Compiler Developer
Hi PascalDragon,

thanks for the hint: But FPC 3.2.0 in ISO mode does not accept the case label "otherwise":

Ehm... right... we've disabled non-supported keywords for ISO-Pascal, but the else keyword is still available thus it also works...

Anyway, I've enabled the otherwise keyword for mode ExtendedPascal in revision 46943 as it should be.

but it is not yet implemented in the current Freepascal/Lazarus version. And work on it is halted since 2019 according bugreport

It's a work in progress, but not a high priority one, especially as quite some parts of the language are involved.


TinyPortal © 2005-2018