In article 200212151724.SAA04057@goedel.fjf.gnu.de, Frank Heckenbach frank@g-n-u.de writes
Martin Liddle wrote:
ml3.p:17: passing arg 1 of 'File_is_writable' from incompatible pointer type'
It compiles and runs with gpc 20020426. Is this a deliberate change or another bug?
It's a known bug (and actually known for a longer time, so I'm surprised it worked in 20020426, maybe another bug there ...).
The problem is that `AnyFile' is not really implemented yet (syntactically), and currently it's just equivalent to `Text'. However, a type-cast from any file type to `AnyFile' is explicitly safe for the built-in `AnyFile' routines, so you can write (for now):
if file_is_writable(PAnyFile(Addr(dev))) then
Thanks, that works fine. I am now starting to make some significant progress. One quirk I came across was that the following program fails to compile with
ml4.p:5: constant out of range
Program ml4; Var Magic:Integer;
begin Magic:=Ord('A')-Ord('a'); end.
The fix is trivial but it used to compile under gpc and has previously worked with two other Pascal compilers.