Re: [fpc-pascal] Exception handling and .dylibs on MacOS

2025-04-04 Thread Sven Barth via fpc-pascal
Adriaan van Os schrieb am Fr., 4. Apr. 2025, 15:30: > Sven Barth wrote: > > Adriaan van Os mailto:adri...@adriaan.biz>> > > schrieb am Do., 3. Apr. 2025, 14:47: > > > > Well, in what form will a patch along these lines be accepted ? I > > really need this to be fixed. > > > > > > In no fo

Re: [fpc-pascal] Exception handling and .dylibs on MacOS

2025-04-04 Thread Adriaan van Os via fpc-pascal
Sven Barth wrote: Adriaan van Os mailto:adri...@adriaan.biz>> schrieb am Do., 3. Apr. 2025, 14:47: Well, in what form will a patch along these lines be accepted ? I really need this to be fixed. In no form, cause this is not a way in which we want to see this fixed. So, how are you

[fpc-pascal] Exception handling and .dylibs on MacOS

2025-04-03 Thread Adriaan van Os via fpc-pascal
I recall this thread from last October I reported this, with a test program, as bug #40950 . The problem is that the fpc RTL, with its global variables, is duplicated in the .dylib as well as in the main program, which confuses the

Re: [fpc-pascal]exception handling issue

2004-08-29 Thread Michalis Kamburelis
Hi Your problem is the consequence of how ReadLn(Longint) works. When you enter 'g' + Enter, ReadLn reads 'g', then ReadLn raises runtime error (this causes EInOutError exception), but Enter is still left unread (it stays in internal Input buffer). That's why the next ReadLn ("ReadLn (tmpLabel

[fpc-pascal]exception handling issue

2004-08-29 Thread kractor
having some problems with exception handling that have me pretty confused i'll include below the entire procedure where the exception handling occurs ... Procedure procAddNewAlbum; Var tmpAlbumName : AnsiString; tmpAlbumID : Longint; tmpNumTra

Re: [fpc-pascal]exception handling

2004-03-21 Thread kractor
Jonas Maebe wrote: The problem is simply that "readln" is split into "read" and "readline_end". The former reads whatever you want to read, the latter consumes the end-of-line. The ioresult is checked after both operations. If the read already returned an error, then an exception will be raise

Re: [fpc-pascal]exception handling

2004-03-21 Thread Jonas Maebe
On 21 mrt 2004, at 14:56, kractor wrote: begin readln(A); NewAlbum.Year:=StrToIntDef(A,0); write('label: '); readln(NewAlbum.alLabel); write('tracks: '); readln(NewAlbum.NumTracks); This avoids the exception. just wondering if there's been any progr

Re: [fpc-pascal]exception handling

2004-03-21 Thread kractor
Michael Van Canneyt wrote: I have been able to reproduce this. However, I'm not sure what the cause it. My guess is that the end-of-line is not consumed before the exception is raised, and therefore the readln(NewAlbum.alLabel); line gets an empty input line. Delphi does consume the end-of

Re: [fpc-pascal]exception handling

2004-03-17 Thread kractor
Michael Van Canneyt wrote: I have been able to reproduce this. However, I'm not sure what the cause it. My guess is that the end-of-line is not consumed before the exception is raised, and therefore the readln(NewAlbum.alLabel); line gets an empty input line. Delphi does consume the end-of

Re: [fpc-pascal]exception handling

2004-03-17 Thread Michael Van Canneyt
On Wed, 17 Mar 2004, kractor wrote: > Michael Van Canneyt wrote: > > >On Tue, 16 Mar 2004, kractor wrote: > > > > > > > >>spent a few moments going over the docs in the manual re: exception > >>handling. for some reason it just doesn't seem to be sinking in, as > >>nothing i've tried as of yet h

Re: [fpc-pascal]exception handling

2004-03-17 Thread vkrish
> > > > try > > readln(NewAlbum.Year); > > except > > on EConvertError do NewAlbum.Year := 0; > > end; > > This should be: > > > try >readln(NewAlbum.Year); > except > on E : EConvertError do NewAlbum.Year := 0;

Re: [fpc-pascal]exception handling

2004-03-17 Thread kractor
Michael Van Canneyt wrote: On Tue, 16 Mar 2004, kractor wrote: spent a few moments going over the docs in the manual re: exception handling. for some reason it just doesn't seem to be sinking in, as nothing i've tried as of yet has managed to stop prog from crashing when data in input that's o

Re: [fpc-pascal]exception handling

2004-03-17 Thread Michael Van Canneyt
On Tue, 16 Mar 2004, kractor wrote: > spent a few moments going over the docs in the manual re: exception > handling. for some reason it just doesn't seem to be sinking in, as > nothing i've tried as of yet has managed to stop prog from crashing when > data in input that's of a different type th

Re: [fpc-pascal]exception handling

2004-03-17 Thread kractor
Thomas Schatzl wrote: Hi again, spent a few moments going over the docs in the manual re: exception handling. for some reason it just doesn't seem to be sinking in, as nothing i've tried as of yet has managed to stop prog from crashing when data in input that's of a different type than program

Re: [fpc-pascal]exception handling

2004-03-17 Thread Thomas Schatzl
Hi again, > > spent a few moments going over the docs in the manual re: exception > > handling. for some reason it just doesn't seem to be sinking in, as > > nothing i've tried as of yet has managed to stop prog from crashing when > > data in input that's of a different type than program is expect

Re: [fpc-pascal]exception handling

2004-03-16 Thread Thomas Schatzl
Subject: [fpc-pascal]exception handling > spent a few moments going over the docs in the manual re: exception > handling. for some reason it just doesn't seem to be sinking in, as > nothing i've tried as of yet has managed to stop prog from crashing when > data in input

[fpc-pascal]exception handling

2004-03-16 Thread kractor
spent a few moments going over the docs in the manual re: exception handling. for some reason it just doesn't seem to be sinking in, as nothing i've tried as of yet has managed to stop prog from crashing when data in input that's of a different type than program is expecting (string as opposed