Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Program Transition - Turbo to Free Pascal

TheKingfishTheKingfish Posts: 15Member
I am a total newbie to Free Pascal (2.4.4), using Win98. A longtime Turbo Pascal (4.0) user, I

Comments

  • TheKingfishTheKingfish Posts: 15Member
    Per my last paragraph, I am slugging it out with multiple compiles, correcting items as I go; not unlike typical programming work. This involves almost 1800 lines of code (program + unit), so it feels like my transition TP code is largely working within the FPC domain. I.e., progress is being made. For the present however, I am stopped by a particular compiler-message. The problem line of code is as follows:
    FUNCTION Prob;

    It is the lead line of a function; the only function among many procedures within the unit. The message reads as follows:
    Syntax error,
  • ActorActor Posts: 438Member
    : I.e., progress is being made. For the present however, I am
    : stopped by a particular compiler-message. The problem line of code
    : is as follows:
    : FUNCTION Prob;
    :
    The compiler expects a type identifier, e.g.,
    [code]
    function prog : integer ;
    [/code]
    Or real, char, string, boolean or some kind of enumerated type.

    Free Pascal may allow a void type. I'm pretty sure that TP does not. Have you tried compiling this with TP?

    Have you tried
    [code]
    function prog : ;
    [/code]
  • TheKingfishTheKingfish Posts: 15Member
    Thanks for your input. As a result, I now have a clean compile. With 2700 lines of code over the main program and two supporting units, I
Sign In or Register to comment.