gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to Delete and Rename of Files


From: Johannes Slotboom
Subject: How to Delete and Rename of Files
Date: Sun, 29 Dec 2019 19:32:49 +0100

Dear all,

I am trying to get my old Logitech Modula-2 code from the end of the eighties begin nineties of last century working again using the gm2 compiler.

Nearly everything compiles now BUT a few compiler errors that concern deleting and renaming of files are persistent and I do not know how to fix.

I make the following imports:

FROM FIO IMPORT OpenForRandom, OpenToRead, OpenToWrite, WriteNBytes, File, Close, ReadNBytes;

With above imports I can create files etc. and this compiles.

In order to Delete and Rename files I also import additionally:

FROM FileSystem IMPORT Delete, Rename;

But if I compile my file (having both FIO and FilesSystem imports).

With my statement

Rename(out,'dm.bin');

I want to do the renaming of the file, but I get following error of gm2:

/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log/FileSystem.def:110:11:parameter mismatch: identifier with an incompatible type is being passed to this procedure
./ilv.mod:698:7: error: error found while compiling the program module
./ilv.mod:698:7:problem in parameter 1, PROCEDURE Rename (VAR f: File; ... ) ;
./ilv.mod:698:7:item being passed is 'out': File
./ilv.mod:698:7:parameter mismatch: identifier with an incompatible type is being passed to this procedure

What I do not understand is that out is of type VAR File.

Last information I compile my file with following statement:

slotboom@JS-at-Asus:~/development/ILV/SRC$ gm2 -g -c -I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log -I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/min -I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim -flibs=logitech ./ilv.mod

Is there someone who knows who to do renaming and deleting of files, while also using FIO?
I would highly appreciate it!

regards

Hans




reply via email to

[Prev in Thread] Current Thread [Next in Thread]