Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-01

Re: write problem

9 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Thomas Kurz
to Peter Dobrev: Hello! I'm new on this list so I don't know if anybody has asked this before. I want to…

Hi Peter,

This program creates try.try file, but it's content is empty. Does anybody know something about this? Thank you in advance.

First of all your program doesn't compile because of the quote in "I'll", but thats a minor problem.
The solution is, that you have to close the file before the end of the program, so that the wirte buffer is written ro the disk and cleared.

BTW, I use FPC v1.0.4 on WinNT4SP6a.
This version will works and writes to the file:

var f1:text;
begin
assign(f1,'try.try');
rewrite(f1);
write(f1,'So Ill be very happy if this appear in the try.try');
CLOSE (f1);
end.

greetings,
Thomas Kurz

Reply by email

Peter Dobrev

Hello!
I'm new on this list so I don't know if anybody has asked this before. I want to ask you a question. Does FPC 1.0.2 supports writting strings in text files? Here's an example:

var f1:text;
begin
assign(f1,'try.try');
rewrite(f1);
write(f1,'So I'll be very happy if this appear in the try.try');
end.

This program creates try.try file, but it's content is empty. Does anybody know something about this? Thank you in advance.
Btw. I'm using Slackware 7.1 if this is important

Reply by email

Peter Dobrev
to Jonas Maebe: close(f1); Adding the above line should do it. Jonas
Jonas Maebe wrote 17 lines
On Thu, 4 Jan 2001, Peter Dobrev wrote: > var f1:text; > begin > assign(f1,'try.try'); > rewrite(f1); > write(f1,'So I'll be very happy if this appear in the try.try'); close(f1); > end. > > This program creates try.try file, but it's content is empty. Does anybody > know something about this? Thank you in advance. Adding the above line should do it.

Thanks a lot!

Jonas

I just want to ask you something else. Well a friend told me that the IDE for the Free Pascal is called "rhide". Well I downloaded it but it uses gpc as a compiler. My question is how to configure rhide to use the fpc compiler?
Thanks in advance!

Reply by email

Ali (Maziar) Amirnezhad
to Jonas Maebe: close(f1); Adding the above line should do it. Jonas

Hi, I think it can be becaouse of ' in your string, " ... I'll be ... " But I think that it may cause an error,
So you can't compile this program!

--Ali Amirnezhad

http://bamdad.org/~ali/

Jonas Maebe wrote 25 lines
On Thu, 4 Jan 2001, Peter Dobrev wrote: > var f1:text; > begin > assign(f1,'try.try'); > rewrite(f1); > write(f1,'So I'll be very happy if this appear in the try.try'); close(f1); > end. > > This program creates try.try file, but it's content is empty. Does anybody > know something about this? Thank you in advance. Adding the above line should do it. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Peter Vreman
to Mattias Gaertner: I want to program MPI (message passage interface) with fpc. Is this possible? Is there…
I want to program MPI (message passage interface) with fpc. Is this possible? Is there already an implementation? What will work and what will not work?

It should be working if you translate the MPI C headers (h2pas will be your friend here!). Everything should then work i think as the MPI calls aren't very complex and there aren't many C macro's iirc (it's already 4 years ago i had to create a program using MPI)

Peter

Reply by email

Peter Vreman
to Peter Dobrev: Thanks a lot! I just want to ask you something else. Well a friend told me that the IDE…
Show quoted text 21 lines
> > var f1:text; > > begin > > assign(f1,'try.try'); > > rewrite(f1); > > write(f1,'So I'll be very happy if this appear in the try.try'); > close(f1); > > end. > > > > This program creates try.try file, but it's content is empty. Does anybody > > know something about this? Thank you in advance. > > Adding the above line should do it. > Thanks a lot! > Jonas I just want to ask you something else. Well a friend told me that the IDE for the Free Pascal is called "rhide". Well I downloaded it but it uses gpc as a compiler. My question is how to configure rhide to use the fpc compiler?

There is also a linux version of the normal IDE. It should be available from the snapshots directory

Peter

Reply by email