Hi again,
Post by Marco van de VoortTo have some positive news in this group also, in trunk (v2.7.1) FPC got a
bit more ISO compatible again.
A first implementation of std-io syntax (description^) was added, and in ISO
mode other reserved words (like STRING) are hidden.
It still has a ways to go, i.e. needs built-ins get, put, page and correct handling of input^ and auto-assigning files to real filenames.
But yes, an improvement is an improvement. (And don't worry, I won't get my hopes up.)
Post by Marco van de VoortI tried to compile P5, and now it bombs on instantation of specific variants
of variable (case) records with new().
As mentioned, this isn't a total dealbreaker. Here's a small sed patch to (mostly but not completely) work around that for pcom.pas. There's still input^ errors, but the other day I (think I) temporarily fixed that, but it still didn't work correctly, so there are more hidden bugs. Still, it's a good start, even if just for larks.
I still wish to correctly build p5 for FreeDOS (presumably with GPC) one of these days, but I need to double-check the ISO tests and try again (1.1 or 1.2-pre from SVN, dunno, some minor nits on the latter, both probably need major .BAT cleanups). Though it's very low priority, I suppose.
# sed script by rugxulo
# Tuesday, November 6, 2012
#
# tested with pcom.pas 1.1 and fpc 2.7.1-pre (go32v2) from trunk
#
# FreeDOS kernel 2041, FreeCOM 0.84-pre2 XMS_Swap,
# (XMSv3) XMGR 2012-10-15, (DPMI 0.90+) CWSDPMI r7
#
# ppc386 -iD = 2012/03/10, -iW = 2.7.1, -iTO = go32v2, -iTP = i386
#
# C:\TMP> ppc386 -Furtl/units/go32v2 -Se20 pcom.pas
#
# (N.B. there are still bugs, so this won't compile or work just yet)
# pcom.pas(237,7) Error: GOTO and LABEL are not supported \
# (use switch -Sg)
#
# "label 99; { terminate immediately }"
s/(\*\$.*/{$mode iso}/
# pcom.pas(1288,9) Fatal: Syntax error, "BEGIN" expected \
# but "STRING" found
#
# (FPC doesn't let "string" be used as variable name in ISO mode)
#
# [var] "string: csstr;"
s/string/stryng/g
# pcom.pas(1393,28) Error: Pointer to object expected
#
# "new(lvp,reel);" (ISO: make smallest union; TP: call constructor)
#
# (yikes!) pcom.pas line 2658: "new(lcp,proc,declared,formal);"
s/\(new([^,]\+\),[^)]\+\();*\)/\1\2/g
# EOF