Sorry to trouble you but I fixed it. I had something like: program Myprogram; {$gpc-main=Dummy} const eps_air = 1.000637; light = 2.99792458E2; {mm and GHz} function fun1(a: double, var b : double) : integer ; asmname 'fun1'; function fun2(a: double, var b : double) : integer; asmname 'fun2'; {$include "maincode.pas"} // the functions and procs are here begin WriteLn ('This is never called.'); Flush (Output); end. When I moved the const declarations into maincode.pas it compiled ok. Very strange. Andrew. ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW. -------------------------------------------------------------------