Program Transition - Turbo to Free Pascal

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

Comments

  • 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,
  • : 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]
  • 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.

Howdy, Stranger!

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

Categories