SRL Archive - General

Pascal Questions and issues


Cigue

2010-08-14 02:44:14

I have started Pascal scripting using Free Pascal. However, I'm having a hard time with it since it has no line numbers, won't take copypastes from other programs and generally sucks. Is there a better IDE/Compiler out there for Pascal? And what other programming language could be suited to writing programs in console? Python is out because it won't make windows .exes.

Last but not least, I have written the following piece of code which won't compile, resulting in a less-than-helpful "Fatal : compilation aborted" error. Can you help me find what's wrong with it?

function IntToStr(Int : integer) : string;
var
S : string;

begin
Str(Int, S);
IntToStr := S;
end;

procedure WriteTXT(Data, Value : String);
var
S : string;
TXTIn, TXTOut : text;
i : integer;
TheBoolean : Boolean;

begin
TheBoolean := False;
Assign(TXTIn, 'C:/Users/CARLPP/DeskTop/TEXT.TXT');
Reset(TXTIn);
Assign(TXTOut, 'C:/Users/CARLPP/DeskTop/TEXT.TMP');
Rewrite(TXTOut);
while not EOF(TXTIn) do
begin
Readln(TXTIn, S);
for i:= 0 to High(Data) do
begin
TheBoolean := S[i] = Data[i];
if not TheBoolean then Break;
end;
if TheBoolean then S := Data+'='+Value;
Writeln(TXTOut, S);
end;
Close(TXTIn);
Close(TXTOut);
end;

begin
end.

The Claw

2010-08-14 02:51:53

http://www.py2exe.org/

Python would be my choice

Cigue

2010-08-14 02:53:59

From: Cigue
Python is out because it won't make windows .exes.

From: The Claw
Python would be my choice

:redface:

The Claw

2010-08-14 02:55:16

http://www.py2exe.org/

Cigue

2010-08-14 03:02:02

Now that's pretty cool! Where should I go to start learning Python?

R0b0t1

2010-08-15 05:16:38

What line is the error on?

mastaraymond

2010-08-15 05:45:02

DOH: http://www.lazarus.freepascal.org/

Wizzup?

2010-08-15 11:05:01

From: mastaraymond
DOH: http://www.lazarus.freepascal.org/


This. ^