Although I don't see the purpose of the above code snippet there is a
difference between existing and non-existing file:
If dat exists (and can be opened without error) then the rewrite is not
done. So in this case dat is only opened for reading and existing data is
not deleted (yet).
That i
Hi,
> program ElementTable ;
> {this program's purpose is to input The Periodic Table of Element }
> type
> yuansu=record
I would also suggest changing that to
type
yuansu= packed record
This will ensure that the size of the data (SizeOf(yuansu)) will be
the same cross platfor and cross O
Hi Jurgen,
> Although I don't see the purpose of the above code snippet there is a
> difference between existing and non-existing file:
> If dat exists (and can be opened without error) then the rewrite is not
> done. So in this case dat is only opened for reading and existing data is
> not dele
{$i-} reset(dat);{$i+}
if ioresult <>0 then
rewrite(dat);
Although not wrong, the purpose of this construction is not clear to me.
In every case you will end up overwriting all data in the file.
In that case you could simply do with a rewrite(dat). The reset(dat)
is really not n
Hi,
> >> Tirdly, once I was programming a program (the source code is below)
> when I input about 100 data the program occured a error ,then it
> terminated. I don't why ,and I can't understand the Error Code it gives
> to me.Can you find my error and fix it for me?
> for i:=1 to 112 do
>
Hi,
> and I think the Free Pascal's ide is not very stable,
> I am using fpc under a MS-DOS 7.1,
This is plain DOS, or a DOS box in Win9x?
(The fp IDE in win9x DOS box used to be almost unworkable)
> >> Tirdly, once I was programming a program (the source code is below)
> when I input abou
Dear FreePascal,
I have some questions when I am using Free Pascal
>> firstly , I find that I Can't use hot-key "Ctrl+N" to add
a new line in the IDE.
and I think the Free Pascal's ide is not very stable,
I am using fpc under a MS-DOS 7.1, sometimes when I am editing
my sourse code