[fpc-pascal]Help newbie !

Jonas Maebe jonas at zeus.rug.ac.be
Fri Oct 27 13:19:30 CEST 2000

>Unit Test;
>Uses Crt;
>Function GetTextColor:byte;
>Function GetTextColor;
>    GetTextcolor := TextAttr mod 16
>And I have compiling error :
>[quy] /disk3/work/pascal/dan3D$ ppc386 test.pas 
>Free Pascal Compiler version 1.0.2 [2000/10/12] for i386
>Copyright (c) 1993-2000 by Florian Klaempfl
>Target OS: Linux for i386
>Compiling test.pas
>test.pas(11,22) Fatal: Syntax error, : expected but ; found
>Could you tell me where is my error Please,

In the default (FPC) mode, you have to repeat all procedure/function 
parameters and results frmo the interface in the implementation, so then 
you have to change it to "Function GetTextColor: byte;" in the 

If you want to use TP-style coding only, add "{$mode tp}" at the start of 
your unit or use the -So command line option.


More information about the fpc-pascal mailing list