[fpc-pascal] Dear FreePascal
彘
799945920 at qq.com
Sun Apr 18 07:16:40 CEST 2010
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(I chosed Microsoft Convention (Ctrl+X,Ctrl+V,Ctrl+C) )
if I pressed Ctrl+C
sometimes the ide will terminate and said like this:
" The ide is terminated , save your soure code and restart the ide"
And sometimes if I use Alt+F and Commend Shell
the ide is still in my sight . Maybe it is because "Out of Memory"?
>> secondly, if I want to debug my program when I use "step over F8"
the ide will display the user screen when I press F8. It is not the
same as Turbo Pascal. I really dislike it ,but I don't know what to
do.
>> 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?
{======= The source code is below ======= }
program ElementTable ;
{this program's purpose is to input The Periodic Table of Element }
type
yuansu=record
En_name:string[3];
mole:real;
period:1..7;
group:string[5];
end;
var
i:integer;
dat:file of yuansu;
jilu:array [1..112] of yuansu;
BEGIN
for i:=1 to 2 do
jilu[i].period:=1; (* Here is a input example :*)
for i:= 3 to 10 do (* En_name:= 'C' *)
jilu[i].period:=2; (* mole:=12.0107 *)
for i:= 11 to 18 do (* period:=2 *)
jilu[i].period:=3; (* group:='IVA' *)
for i:= 19 to 36 do
jilu[i].period:=4;
for i:=37 to 54 do
jilu[i].period:=5
for i:=55 to 71 do
jilu[i].period:=6;
for i:=72 to 112 do
jilu[i].period:=7;
for i:=1 to 112 do
begin
write('name:');
readln(jilu[i].EN_name); {it terminated when it }
write('mole:'); { runs to somewhere }
readln(jilu[i].mole); { around here}
write('group:');
readln(jilu[i].group);
end;
assign(dat,'dat.bin');
{$i-} reset(dat);{$i+}
if ioresult <>0 then
rewrite(dat);
for i:=1 to 112 do
write(dat,jilu[i]);
close(dat);
write(' ':10,'OK!');
readln
END.
Sincenrely
Andy Scout
2010.4.17
More information about the fpc-pascal
mailing list