Re: [fpc-pascal] Dear FreePascal

2010-04-21 Thread Jürgen Hestermann
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

Re: [fpc-pascal] Dear FreePascal

2010-04-21 Thread Bart
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

Re: [fpc-pascal] Dear FreePascal

2010-04-21 Thread Bart
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

Re: [fpc-pascal] Dear FreePascal

2010-04-20 Thread Jürgen Hestermann
{$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

Re: [fpc-pascal] Dear FreePascal

2010-04-20 Thread Bart
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 >

Re: [fpc-pascal] Dear FreePascal

2010-04-19 Thread Bart
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

[fpc-pascal] Dear FreePascal

2010-04-17 Thread
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