According to Tom Dye:
There might be another problem. The following code once compiled, but doesn't now.
*** code snippet ***
module bug interface;
export bug = (StrPCopy);
const LONGEST_STRING = 256;
type Any_String = String(LONGEST_STRING); CString = __cstring__;
function StrPCopy (Dest : CString; Src : Any_String) : CString;
end.
module bug implementation; [...] function StrPCopy (Dest : CString; Src : Any_String) : CString;
Since `Any_String' isn't exported, the implementation module does not know about it. (Should it? What does the standard say about this?) You can either export `Any_String' or change `StrPCopy' to accept just a `String' parameter. The latter method did not work in gpc-2.0 but is in fact the correct way to pass an arbitrary string.
function StrPCopy (Dest : CString; Src : String) : CString;
or
function StrPCopy (Dest : CString; Const Src : String) : CString;
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005] maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]