Re: [fpc-pascal] EAccessViolation

2015-08-13 Thread Sven Barth
Am 13.08.2015 22:17 schrieb "Michael Van Canneyt" : >> if (i=0) then begin >>writeln ('node was empty / non existant'); >>exit; >> end; >> for c:=0 to i do >> writeln (node[c]);// line 85 > > > This should be > > for c:=0 to i-1 do > > writeln (node[c]);// line 85 O

Re: [fpc-pascal] EAccessViolation

2015-08-13 Thread Christo Crause
On 13 Aug 2015 10:15 PM, "Chris Moody" wrote: > > Hi all, > > I have this procedure in my program: > > procedure DisplayNode (var node:astring); > var c, i:integer; > begin > i:=SizeOf(node); > if (i=0) then begin > writeln ('node was empty / non existant'); > exit; > end; > for c:

Re: [fpc-pascal] EAccessViolation

2015-08-13 Thread Michael Van Canneyt
On Thu, 13 Aug 2015, Chris Moody wrote: Hi all, I have this procedure in my program: procedure DisplayNode (var node:astring); var c, i:integer; begin i:=SizeOf(node); This should be length(node) if (i=0) then begin writeln ('node was empty / non existant'); exit; end; for c:=0

[fpc-pascal] EAccessViolation

2015-08-13 Thread Chris Moody
Hi all, I have this procedure in my program: procedure DisplayNode (var node:astring); var c, i:integer; begin i:=SizeOf(node); if (i=0) then begin writeln ('node was empty / non existant'); exit; end; for c:=0 to i do writeln (node[c]);// line 85 end; astring is an Ar

Re: [fpc-pascal] EAccessViolation on wrong exception re-raise: intended behavior?

2015-04-07 Thread Michael Van Canneyt
On Sun, 5 Apr 2015, leledumbo wrote: I tested in Delphi XE, it also crashes. So, yes it is intended behaviour. It is not desirable, of course. But there is no way the compiler can decide whether the 'raise e' statement is correct. That's bad to know :| What if you ask Embarcadero first? Pro

Re: [fpc-pascal] EAccessViolation on wrong exception re-raise: intended behavior?

2015-04-05 Thread leledumbo
> I tested in Delphi XE, it also crashes. So, yes it is intended behaviour. > > It is not desirable, of course. But there is no way the compiler can > decide > whether the 'raise e' statement is correct. That's bad to know :| What if you ask Embarcadero first? Probably they missed the point. I

Re: [fpc-pascal] EAccessViolation on wrong exception re-raise: intended behavior?

2015-03-31 Thread Michael Van Canneyt
On Tue, 31 Mar 2015, leledumbo wrote: Consider the following program: {$mode objfpc} uses sysutils; begin try try raise exception.create('test'); except on e: exception do begin e.message := 'tset'; raise e; // correct re-raise should only have raise; no excep

[fpc-pascal] EAccessViolation on wrong exception re-raise: intended behavior?

2015-03-31 Thread leledumbo
Consider the following program: {$mode objfpc} uses sysutils; begin try try raise exception.create('test'); except on e: exception do begin e.message := 'tset'; raise e; // correct re-raise should only have raise; no exception variable may present end;

Re: [fpc-pascal]EACCESSVIOLATION

2003-08-14 Thread Marco van de Voort
> Is there anybody? (The archive stops on May, 7th ...) > I am new to the list - so tell me, if this is the wrong place for my > questions. I wrote a freePascal program under Linux (Free Pascal Compiler > version 1.0.10 [2003/06/26] for i386), which reads information from serial > ports and send

Re: [fpc-pascal]EACCESSVIOLATION

2003-08-14 Thread Peter Vreman
> Thank You, Marco, for Your immidiate response! >> >I wrote a freePascal program under Linux (Free Pascal Compiler >> > version 1.0.10 [2003/06/26] for i386), which reads information from >> serial >> > ports and sends information to serial ports and does some >> calculations. >> > There are no po

[fpc-pascal]EACCESSVIOLATION

2003-08-14 Thread Rudolf Harney
Hi! Is there anybody? (The archive stops on May, 7th ...) I am new to the list - so tell me, if this is the wrong place for my questions. I wrote a freePascal program under Linux (Free Pascal Compiler version 1.0.10 [2003/06/26] for i386), which reads information from serial ports and sends in

Re: [fpc-pascal]EACCESSVIOLATION

2003-08-14 Thread Rudolf Harney
Thank You, Marco, for Your immidiate response! > >I wrote a freePascal program under Linux (Free Pascal Compiler > > version 1.0.10 [2003/06/26] for i386), which reads information from serial > > ports and sends information to serial ports and does some calculations. > > There are no pointers, invo