Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-12

runtime problem

16 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hofmann, Norbert

Dir Sirs,

since some days I have installed your Free Pascal Compiler ( I'm not yet subscribed) and by trying to get a program started using the IDE Run menu I always get the same error. This error says ' program exited with exit code= 101' . The program code is very simple

program infodemo;
begin
	writeln (' test printout');
	writeln;
end.

If I use one of your demo programs I get the same error. But If start the programs outside the IDE environment they run without error. I 'm working on a Windows NT PC and the hard disc where the programs are located have about 7 GByte free space. My question is : What did I wrong, or have I something over looked what was need for installation. I had downloaded the complete Win32 file (17 MB).

Please could you give me an advice to solve the problem. Thanks in advance.

Norbert Hofmann

Reply by email

Jonas Maebe
to Hofmann, Norbert
Norbert wrote
since some days I have installed your Free Pascal Compiler ( I'm not yet subscribed) and by trying to get a program started using the IDE Run menu I always get the same error. This error says ' program exited with exit code= 101' . The program code is very simple

This is caused by a bug in the IDE that shipped with version 1.0.4 of the compiler. You can either wait for version 1.0.6 which should be out real soon now (I hope), or download a snapshot from <http://www.freepascal.org/develop.html#snapshotsv10>.

Jonas

Reply by email

andrew mejia
to Jonas Maebe

i'm running the win32 ver of this pascal app and am not sure how to set the path as mentioned by the
install program in DOS command-line. how is this
achieved..?

i have just installed the software but can't seem to run it...

thanks for your help!

andrew
:wq

________________________________________________________________ Nokia 5510 looks weird sounds great.
Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001.

Reply by email

Gene Buckle
to andrew mejia

I've been pulling my hair out for quite some time over a really odd problem.

I'm using the 12/03 snapshot of 1.0.5 on a Linux 2.2 system.

The following program when run via a telnet session started by mTelnet or older versions of Hyperterm cause the system to send and endless stream of CRLF pairs:

program foo;
Uses Crt, Dos;

begin

  writeln('this is a test');
  readln;

end;
From what I've been able to discover (with much help from external sources) is that for some reason the FPC program is sending [6n and then expects some kind of response. I think that mTelnet and Hyperterm (and some others) are returning either an invalid or incorrect response, thus sending some bit of code wildly out of control.

Ideas?

Thanks for your time.

Gene Buckle

Reply by email

Andreas K. Foerster
to Gene Buckle
Gene Buckle wrote 7 lines
>From what I've been able to discover (with much help from external sources) is that for some reason the FPC program is sending [6n and then expects some kind of response. I think that mTelnet and Hyperterm (and some others) are returning either an invalid or incorrect response, thus sending some bit of code wildly out of control. Ideas?

Use nCRT instead of CRT.
nCRT uses ncurses and so it uses the terminfo database. Disadvantage: the program will be dynamically linked to ncurses and libc6.

Tschuess Andreas

Reply by email

Gene Buckle
to Andreas K. Foerster
Show quoted text 15 lines
On Wed, Dec 05, 2001 at 08:03:02AM -0800, Gene Buckle wrote: > >From what I've been able to discover (with much help from external > sources) is that for some reason the FPC program is sending [6n and then > expects some kind of response. I think that mTelnet and Hyperterm (and > some others) are returning either an invalid or incorrect response, thus > sending some bit of code wildly out of control. > > Ideas? Use nCRT instead of CRT. nCRT uses ncurses and so it uses the terminfo database. Disadvantage: the program will be dynamically linked to ncurses and libc6.

nCrt causes me even worse problems - it doubles every character echoed when using my input routines.

It was pointed out today that I might want to try "tset ansi" and I'll be damned if that didn't solve the problem entirely. I still think there is a bug in the CRT unit somewhere (in GetXY?) but this is a good enough fix for me.

g.

Reply by email

Jonas Maebe
to andrew mejia: i'm running the win32 ver of this pascal app and am not sure how to set the path as…
andrew mejia wrote
i'm running the win32 ver of this pascal app and am not sure how to set the path as mentioned by the install program in DOS command-line. how is this achieved..?

Since you are not very comfortable with the command line, I would advise against using it. You're better off with an IDE (Integrated Development Environment) probably. FPC comes with one (fp.exe, it in the pp\bin\win32 directory). There are also third-party ones available, have a look at the "links" section on our website.

If you really want to use the command line version of the compiler, edit you c:\autoexec.bat file and look for a line containing "PATH=". If there is one, add ";c:\pp\bin\win32" to it. If there isn't one, add a line containing "PATH=%PATH%;c:\pp\bin\win32".

i have just installed the software but can't seem to run it...

The command line compiler is called ppc386.exe. You run it using

ppc386 filename.pas

where filename.pas is the pascal source file you want to compile. This file is a normal textfile and can be created/edited using any "normal" text editor (i.e. not by MS Word, but e.g. by NotePad)

Jonas

Reply by email

Stephen Hurd
to Andreas K. Foerster: Use nCRT instead of CRT. nCRT uses ncurses and so it uses the terminfo database.…
Show quoted text 27 lines
-----Original Message----- From: Behalf Of Andreas K. Foerster Sent: Wednesday, December 05, 2001 11:07 To: Subject: Re: [fpc-pascal]Odd behavior with Crt unit.. On Wed, Dec 05, 2001 at 08:03:02AM -0800, Gene Buckle wrote: > >From what I've been able to discover (with much help from external > sources) is that for some reason the FPC program is sending [6n and then > expects some kind of response. I think that mTelnet and Hyperterm (and > some others) are returning either an invalid or incorrect response, thus > sending some bit of code wildly out of control. > > Ideas? Use nCRT instead of CRT. nCRT uses ncurses and so it uses the terminfo database. Disadvantage: the program will be dynamically linked to ncurses and libc6. -- Tschuess Andreas

Last time I used nCrt, KeyPressed ate the key... BUT In the latest version of Crt at the least, I've found that ensuring a tset (Terminal Setup) is being done on the tty before the program runs fixes the problem (I use 'tset ansi')

Reply by email

andrew mejia
to Jonas Maebe: Since you are not very comfortable with the command line, I would advise against using…

Jonas,

thanks for taking the time to explain this... i
didn't see any documentation regarding it.

i am an old user of Turbo Pascal, way back in 1993/4.

also, i am actually more familiar and comfortable with unix / linux commandline, but am learning DOS...

thanks for your help!

andrew
:wq

--- Jonas Maebe wrote: >

Show quoted text 51 lines
On woensdag, december 5, 2001, at 09:04 , andrew mejia wrote: > i'm running the win32 ver of this pascal app and am > not sure how to set the path as mentioned by the > install program in DOS command-line. how is this > achieved..? Since you are not very comfortable with the command line, I would advise against using it. You're better off with an IDE (Integrated Development Environment) probably. FPC comes with one (fp.exe, it in the pp\bin\win32 directory). There are also third-party ones available, have a look at the "links" section on our website. If you really want to use the command line version of the compiler, edit you c:\autoexec.bat file and look for a line containing "PATH=". If there is one, add ";c:\pp\bin\win32" to it. If there isn't one, add a line containing "PATH=%PATH%;c:\pp\bin\win32". > i have just installed the software but can't seem to > run it... The command line compiler is called ppc386.exe. You run it using ppc386 filename.pas where filename.pas is the pascal source file you want to compile. This file is a normal textfile and can be created/edited using any "normal" text editor (i.e. not by MS Word, but e.g. by NotePad) Jonas _______________________________________________ fpc-pascal maillist -

http://lists.freepascal.org/mailman/listinfo/fpc-pascal

________________________________________________________________ Nokia 5510 looks weird sounds great.
Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001.

Reply by email

Andreas K. Foerster
to Gene Buckle: nCrt causes me even worse problems - it doubles every character echoed when using my…
Gene Buckle wrote 8 lines
> Use nCRT instead of CRT. > nCRT uses ncurses and so it uses the terminfo database. > Disadvantage: the program will be dynamically linked to ncurses and > libc6. > nCrt causes me even worse problems - it doubles every character echoed when using my input routines.

Is the TERM environment variable set correctly?

It was pointed out today that I might want to try "tset ansi" and I'll be damned if that didn't solve the problem entirely.

No, tset doesn't set the TERM variable.
If you set that, you don't need tset anymore.

My TermInfo database has also the entry "ms-vt100". That gives the best results for the telnet of Windows.

BTW. if you search for a better terminal/telnet/ssh, try the program teraterm.

I still think there is a bug in the CRT unit somewhere (in GetXY?) but this is a good enough fix for me.

I already mentioned this problem before, but nobody cared. :-(

Tschuess Andreas

Reply by email

Marco van de Voort
to Andreas K. Foerster
Show quoted text 13 lines
Is the TERM environment variable set correctly? > It was pointed out today that I might want to try "tset ansi" and I'll be > damned if that didn't solve the problem entirely. No, tset doesn't set the TERM variable. If you set that, you don't need tset anymore. My TermInfo database has also the entry "ms-vt100". That gives the best results for the telnet of Windows. BTW. if you search for a better terminal/telnet/ssh, try the program teraterm.

Putty and dtelnet are both capable of showing the FPC IDE. Putty also knows ssh1 and 2.

For putty set font to terminal, and encoding to "x-windows"

Reply by email

Jonas Maebe
to andrew mejia: thanks for taking the time to explain this... i didn't see any documentation regarding…
andrew mejia wrote
thanks for taking the time to explain this... i didn't see any documentation regarding it.

I don't think there is any either (apart from that line the installer writes to the screen) :/

i am an old user of Turbo Pascal, way back in 1993/4. also, i am actually more familiar and comfortable with unix / linux commandline, but am learning DOS...

In that case, Dos should be relatively easy to learn :)

Jonas

Reply by email

Gene Buckle
to Andreas K. Foerster: Is the TERM environment variable set correctly? No, tset doesn't set the TERM variable.…
BTW. if you search for a better terminal/telnet/ssh, try the program teraterm.

I'm actually really happy with PuTTY. It's fast, free and does a good job with ANSI terminal emulation.

Show quoted text 6 lines
> I still think there is > a bug in the CRT unit somewhere (in GetXY?) but this is a good enough fix > for me. I already mentioned this problem before, but nobody cared. :-(

Maybe it's not that no one card, but the right person didn't see the bug report. Hey! Right PErson! See this? Fix it! *laughs*

g.

Reply by email

andrew mejia
to Jonas Maebe: I don't think there is any either (apart from that line the installer writes to the…

ok i do now feel like an idiot...

i just printed up and have been reading the 'user.pdf' from the full .zip download and it explains perfectly the install and path issue.

i'm finding the documentation to be very well put
together.

i do promise to *READ* before posting any more simple questions!

andrew
:wq

--- Jonas Maebe wrote: >

Show quoted text 28 lines
On donderdag, december 6, 2001, at 08:19 , andrew mejia wrote: > thanks for taking the time to explain this... i > didn't see any documentation regarding it. I don't think there is any either (apart from that line the installer writes to the screen) :/ > i am an old user of Turbo Pascal, way back in 1993/4. > > also, i am actually more familiar and comfortable with > unix / linux commandline, but am learning DOS... In that case, Dos should be relatively easy to learn :) Jonas _______________________________________________ fpc-pascal maillist -

http://lists.freepascal.org/mailman/listinfo/fpc-pascal

________________________________________________________________ Nokia 5510 looks weird sounds great.
Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001.

Reply by email

Jonas Maebe
to Gene Buckle: I'm actually really happy with PuTTY. It's fast, free and does a good job with ANSI…
Gene Buckle wrote 10 lines
>> I still think there is >> a bug in the CRT unit somewhere (in GetXY?) but this is a good enough >> fix >> for me. > > I already mentioned this problem before, but nobody cared. :-( Maybe it's not that no one card, but the right person didn't see the bug report. Hey! Right PErson! See this? Fix it! *laughs*

Maybe its simply that no one has the time (or that te person who wrote this doesn't see any error in the code). Here's the source, but I don't know anyting about ansi codes, so I frankly don't have a clue about how ths works.

***
procedure GetXY(var x,y:byte);
var
   fds    : fdSet;
   i,j,
   readed : longint;
   buf    : array[0..255] of char;
   s      : string[16];
begin
   x:=0;
   y:=0;
   s:=#27'[6n';
   fdWrite(0,s[1],length(s));
   FD_Zero(fds);
   FD_Set(1,fds);
   if (Select(2,@fds,nil,nil,1000)>0) then
    begin
      readed:=fdRead(1,buf,sizeof(buf));
      i:=0;
      while (i+5<readed) and (buf[i]#27) and (buf[i+1]'[') do
       inc(i);
      if i+5<readed then
       begin
         s:=space(16);
         move(buf[i+2],s[1],16);
         i:=Pos(';',s);
         if i>0 then
          begin
            Val(Copy(s,1,i-1),y);
            j:=Pos('R',s);
            if j=0 then
             j:=length(s);
            Val(Copy(s,i+1,j-(i+1)),x);
          end;
       end;
    end;
end;
***

Jonas

Reply by email