[fpc-devel] get/put in fpc

Tomas Hajny XHajT03 at hajny.biz
Fri Oct 9 19:55:31 CEST 2015


On Fri, October 9, 2015 19:39, Schneider wrote:
 .
 .
> In standard Pascal, one can use get() and put() to access files.  The
> current file object is accessed with file^.  I use this in many
> places.
 .
 .
> Free Pascal Compiler version 2.6.4 [2015/10/07] for x86_64
> Copyright (c) 1993-2014 by Florian Klaempfl and others
> Target OS: Darwin for x86_64
> Compiling getput.p
> getput.p(9,56) Error: Illegal qualifier
> getput.p(11) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /sw/bin/ppcx64 returned an error exitcode (normal if you did not
> specify a source file to be compiled)
>
> So shellp^ failed.
>
> If I try instead
>
>    get(shellp);
>
> I get:
>
> getput.p(12,7) Error: Identifier not found "get"
> getput.p(14) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
>
> So get and put do not exist in fpc?

Have you compiled your code with -Miso command line parameter as already
suggested by someone else? I assume that unit iso7185 providing these
procedures is then automatically included. If not, you can certainly add
this unit to your uses clause manually.

Second, as also mentioned by Jonas, the part of ISO standard support
related to file handling has been only fixed recently and is not available
in any released version. You might be able to build a newer compiler
version from the sources if needed, although I cannot judge how easy or
difficult that may get on your platform of choice (but it's certainly
doable). Unfortunately, I don't see any ready made snapshots available for
your platform on our FTP server - that would have been an easy solution.

Tomas





More information about the fpc-devel mailing list