Re: [fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

2013-06-11 Thread Jeppe Græsdal Johansen
Den 11-06-2013 04:49, m...@rpzdesign.com skrev: Passing a Pchar gives weird, erratic behavior Could you maybe describe this weird, erratic behavior? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

2013-06-11 Thread Marco van de Voort
In our previous episode, m...@rpzdesign.com said: Passing a Pchar gives weird, erratic behavior Please make minimal examples in a few lines, and add them to the bugtracker. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

2013-06-11 Thread m...@rpzdesign.com
To Marco and Jeppe: As for 2 examples: res := PosEx(mypchar,'NEEDLE',35) ; res := Copy (mypchar, 10,15) ; What are the byte boundaries here? Zero Based from the pointer? 1 Based from the pointer? As far as behavior, it would throw the program in unstable land over time and gdb would show

Re: [fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

2013-06-11 Thread Marco van de Voort
In our previous episode, m...@rpzdesign.com said: As for 2 examples: res := PosEx(mypchar,'NEEDLE',35) ; res := Copy (mypchar, 10,15) ; These are not examples. These are snippets. Examples I can compile and debug. What are the byte boundaries here? Zero Based from the pointer? I

Re: [fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

2013-06-11 Thread m...@rpzdesign.com
Oops, those parameters for Posex were backwards: res := PosEx('NEEDLE',mypchar,35) ; On 6/11/2013 7:10 AM, m...@rpzdesign.com wrote: To Marco and Jeppe: As for 2 examples: res := PosEx(mypchar,'NEEDLE',35) ; res := Copy (mypchar, 10,15) ; What are the byte boundaries here? Zero Based from

Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux - MIPS-linux?

2013-06-11 Thread Dennis Poon
Jonas, Thanks for the guidance. Where is cpumips defined? Also, I could not use the $fpctarget variable, I had to use the exact file path to avoid some complains in lazarus. #include /etc/fpc.cfg #ifdef cpumips -Fu/home/dennis/fpc/$fpcversion/units/$fpctarget

Re: [fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

2013-06-11 Thread Antonio Fortuny
Hi Folks. I don't know how Jeppe is playing around but because I want to make sure FPC works preoperly I decided to take some time to see what happens Yhis is the code snippet I use in Win32 and Linux x86_64 All are Lazaur 1.0.8 Put the code under a

[fpc-pascal] Inherited and not virtual/overridden procedures

2013-06-11 Thread Bart
Hi, I thought that if I had a subclass that inherited form a parentclass, and both have a method with the same name (Bar), then the method of the subclass hid the method of the parentclass, and you could not call inherited Bar in the subclass. More specifically I was under the impression that

Re: [fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

2013-06-11 Thread Felipe Monteiro de Carvalho
On Tue, Jun 11, 2013 at 5:29 PM, m...@rpzdesign.com m...@rpzdesign.com wrote: I totally understand, but I did not discover the problem until I was well into a larger project that I could not de-construct to try to generate a reproducible sample. I am under a time pressure, decided to start