[SOLVED] Compile time error for function declaration, why? lazarus / 16-Databases ---------------------------------------------------------------------- Elmug · 2012-06-29 20:19 Hi everyone, I have put a function in an application, to convert a fieldtype value to a string, that I found on the web. function FldToStr(const Value : TFieldType) : String; begin    Case Value of    ftUnknown    :  FldToStr := 'Unknown';       (etc.)       (etc.)    ftTimeStamp   :  FldToStr := 'TimeStamp';    ftFMTBcd   :  FldToStr := 'FMTBcd';    end; end; I get this error: unit1.pas(51,1) Fatal: Syntax error, "identifier" expected but "BEGIN" found The error detector  highlites the code-line with the word 'begin'. Would appreciate help on getting it right. Thanks! ---------------------------------------------------------------------- Laksen · 2012-06-29 22:23 Did you put it in the interface section? ---------------------------------------------------------------------- Elmug · 2012-06-30 05:57 Quote from: Laksen on June 30, 2012, 12:23:16 amDid you put it in the interface section? Thanks, Laksen for pointing this out. I went back to a working backup, and carefully pasted it on it, and at the implementation section, and it has now compiled without errors. I can't really say now what specifically was wrong, as I tried on the current version to resolve it and gave up. But it definitely was a typo of some sort, or a deleted line somewhere. I am moving on to using it and see if I can get this resolved. Will report back, if I can do it, or if I get stuck. EDITED TO  REPORT BACK: Got it all squared out. Reference:    http://www.lazarus.freepascal.org/index.php/topic,17406.0.html