Re: [fpc-pascal] Calling unassigned procedure gives no stack trace with -gl

2005-07-13 Thread Tom Verhoeff
On Thu, Jul 14, 2005 at 01:12:23AM +0200, Marcel Martin wrote: > Tom Verhoeff a écrit : > >begin > > VMyClass := TMyClass.Create; > > //VMyClass.FP := VMyClass.P; { with this assignment, it works } > > VMyClass.FP; { this causes an Access Violation } > > Of course, at this point FP = nil sinc

Re: [fpc-pascal] System.Write broken?

2005-07-13 Thread John Coppens
On Wed, 13 Jul 2005 19:55:33 -0500 Elio Cuevas Gómez <[EMAIL PROTECTED]> wrote: > I tried your version, but didn't make much diference. Looks like Write > is indeed broken, i'll report it as a bug. Thanks for all your help :). I tried it here - works fine for me (See code tested below). A doubt:

Re: [fpc-pascal] System.Write broken?

2005-07-13 Thread Elio Cuevas Gómez
El Mié 13 Jul 2005 17:50, John Coppens escribió: > > How is Mapa declared? If as integers, it should work. This does not work > with strings. var MapFile: Text; Mapa: array[0..MAX_MAPX, 0..MAX_MAPY] of Integer; Yes, it's as integers. > > It'd be a little more elegant if you do: > > for j := 0

Re: [fpc-pascal] Calling unassigned procedure gives no stack trace with -gl

2005-07-13 Thread Marcel Martin
Let it be. I just saw that, in fact, you told about the problem in the subject of the post :-) mm ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Calling unassigned procedure gives no stack trace with -gl

2005-07-13 Thread Marcel Martin
Tom Verhoeff a écrit : begin VMyClass := TMyClass.Create; //VMyClass.FP := VMyClass.P; { with this assignment, it works } VMyClass.FP; { this causes an Access Violation } Of course, at this point FP = nil since you didn't set it. mm ___ fpc-

Re: [fpc-pascal] System.Write broken?

2005-07-13 Thread John Coppens
On Wed, 13 Jul 2005 16:50:03 -0500 Elio Cuevas Gómez <[EMAIL PROTECTED]> wrote: > The code to read the file looks like this (yeah, bad programming i > know): for j := 0 to MAX_MAPY do > for i := 0 to MAX_MAPX do > Read(MapFile, Mapa[i, j]); > How is Mapa declared? If as integers, it sh

[fpc-pascal] Calling unassigned procedure gives no stack trace with -gl

2005-07-13 Thread Tom Verhoeff
When the following program is compiled with option -gl -Mdelphi and executed, it results in An unhandled exception occurred at $ : EAccessViolation : Access violation without a stack trace or line numbers. How come? Is that a bug? (If so, I will submit it as such.) The

Re: [fpc-pascal] System.Write broken?

2005-07-13 Thread Elio Cuevas Gómez
El Mié 13 Jul 2005 16:07, Micha Nelissen escribió: > > Don't you want 'ReadLn' ? > > What does Read do anyway, on PChars, strings and arrays ? > > Micha > Ok, i gave a bad example (and ReadLn works for that) but in my app i read a tile map from a text file. The format is very simple: The values ar

Re: [fpc-pascal] System.Write broken?

2005-07-13 Thread L505
>Don't you want 'ReadLn' ? >What does Read do anyway Read character by character instead of line by line. Both useful for different things, read is more precise. Say if your file was not delimted by lines. (pipes, commas, etc.) Readln() is essentially a wrapper for Read() Read finds CRLF's or LF'

[fpc-pascal] System.Write broken?

2005-07-13 Thread Elio Cuevas Gómez
Hi, the folowing code enters infinite loop in the newest version of FreePascal: program textfile; var Archivo: Text; Linea: AnsiString; begin Assign(Archivo, 'test.pp'); Reset(Archivo); While not Eof(Archivo) do begin Read(Archivo, Linea); WriteLn(Linea); end; Close(Arch

Re: [fpc-pascal] System.Write broken?

2005-07-13 Thread Micha Nelissen
On Wed, 13 Jul 2005 16:02:21 -0500 Elio Cuevas Gómez <[EMAIL PROTECTED]> wrote: > Hi, the folowing code enters infinite loop in the newest version of > FreePascal: > > program textfile; > > var > Archivo: Text; > Linea: AnsiString; > > begin > Assign(Archivo, 'test.pp'); > Reset(Archiv

Re: [fpc-pascal] alternative source format

2005-07-13 Thread L505
| i had in mind something like unified project format for all pascal's IDEs. | Open XML formats are popular in open source world now. But i do not think I think Pascal code and basic config files are a lot easier to read than XML and all the tags. I think XML obfuscates the pascal code. With some

Re: [fpc-pascal] alternative source format

2005-07-13 Thread Rimgaudas Laucius
Hello, i had in mind something like unified project format for all pascal's IDEs. Open XML formats are popular in open source world now. But i do not think this idea were anymore. > > Hello, > > Hi, > > > the problem is that IDEs like FP and others have no exact > > place where to store compiler

Re: [fpc-pascal] Crosscompile linking problems

2005-07-13 Thread Lukas Gebauer
> > > > > > C:\FPC\2.0.0\lib\/libc.so: undefined reference to > > > > > > [EMAIL PROTECTED]' > > > > > > C:\FPC\2.0.0\lib\/libpthread.so: undefined reference to > > > > > > [EMAIL PROTECTED]' > > > > > > C:\FPC\2.0.0\lib\/libc.so: undefined reference to > > > > > > [EMAIL PROTECTED]' > > > > > > Ha