Results 1 to 5 of 5

Thread: Value parameters won't compile?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Value parameters won't compile?

    I thought I had them working in FPC before... tried to do it in one of my programs and it's a no-go; so I went right to the horses mouth.

    http://www.freepascal.org/docs-html/...2-14200011.4.1

    Their example code

    Code:
    program testp;  
      
    Const  
      MyConst = 20;  
      
    Procedure MyRealFunc(I : Integer = MyConst);  
      
    begin  
      Writeln('Function received : ',I);  
    end;  
      
    begin  
      MyRealFunc;  
    end.
    Will NOT compile here in 2.4.4 -- Win 7 x64 in either the x64 or x86 versions of the compiler.

    test.pas(6,34) Fatal: Syntax error, ")" expected but "=" found

    I really don't want to have to write two versions of the same function on this.
    Last edited by deathshadow; 22-08-2011 at 11:09 AM.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •