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?
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.