Re: [fpc-pascal] Build scripts for Freepascal and Lazarus compilation from source

2010-10-05 Thread Matthias K.
On Tue, Oct 5, 2010 at 3:57 PM, Jonas Maebe wrote: > > On 05 Oct 2010, at 15:40, Matthias K. wrote: > >> there is one improvement to this. >> The first pass for the new compiler doesn't need "make all" which >> compiles all packages too. This results in &

Re: [fpc-pascal] Build scripts for Freepascal and Lazarus compilation from source

2010-10-05 Thread Matthias K.
Hi, there is one improvement to this. The first pass for the new compiler doesn't need "make all" which compiles all packages too. This results in duplicate package compilation on changes and packages take most time. The following lines are part of an old fpc 2.4 gentoo ebuild I use, which compile

Re: [fpc-pascal] Interface with NASM

2010-09-14 Thread Matthias K.
Hi, I've played around with your code and didn't get usefull results either at first glance. Instead of putting the printc test into driver, I've wrote a pure pascal unit which does the same as your test.asm, compiled it, disassembled it and modfied the nasm program. That worked. I'm on a differen

Re: [fpc-pascal] about dynamic array -- PS

2010-05-06 Thread Matthias K.
2010/5/6 spir ☣ : > Hello, > > It seems the actual issue with static array is that the size is part the > type. So that one cannot even use a pointer to refer to an array which size > is supposed to change (since the pointer's type itself would be constrained > by the size). Is this correct? > I

Re: [fpc-pascal] two small ?s - high(real) and nearest 2^x

2009-10-10 Thread Matthias K.
On Sat, Oct 10, 2009 at 9:09 PM, Aleksa Todorovic wrote: > On Sat, Oct 10, 2009 at 20:58, Matthias K. wrote: >> On Sat, Oct 10, 2009 at 7:14 PM, David Emerson wrote: >>> 2. For the purposes of reserving memory in block sizes that can be >>> easily reallocated, I like

Re: [fpc-pascal] two small ?s - high(real) and nearest 2^x

2009-10-10 Thread Matthias K.
On Sat, Oct 10, 2009 at 7:14 PM, David Emerson wrote: > 1. Is there a way to get the highest and lowest real values? I can do > high(longint) but high(real) gives me an error. Also of interest is a > low(real) value (-m * 10^n) as distinct from the smallest real value > (m * 10^-n) As stated in t

Re: [fpc-pascal] How to Copy a Record data to a buffer?

2009-10-10 Thread Matthias K.
Hi, For the Move solution, use "Move( SendBuffer, rcvData[0], count )".. Same common mistake with [0]. sry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to Copy a Record data to a buffer?

2009-10-10 Thread Matthias K.
Hi, either use "Move( SendBuffer, rcvData, count )" (recommended since its from rtl, not windows api) or "CopyMemory( @rcvData[0], @SendBuffer, count )". Its a common mistake to use @ instead of @[ 0 ]. regards On Sat, Oct 10, 2009 at 11:51 AM, yu ping wrote: > TCommsBuffer = packed record >    

Re: Re[2]: [fpc-pascal] Is this an error ?

2009-10-02 Thread Matthias K.
> In the other hand the question is if that pascal code should work or > raise an error in 64 bits because I think that this code: > > a := NativeInteger div NativeUnsignedInteger; > > should have the same behaviour in 32 and 64 bits, so I do not know if > I must fill a bug report or not :-? Fill

Re: [fpc-pascal] Is this an error ?

2009-10-02 Thread Matthias K.
Hi, I compiled this with fpc -al .. under linux 64. The difference is, "r := div " results in an "divq" instruction wich is for unsigned integer division only. "r := div " results in "idivq" which is for signed integer division. On execution this results in an error (i've got divbyzero on amd64)

[fpc-pascal] Re: as keyword behaivor

2009-09-11 Thread Matthias K.
Sorry for double post, just for correction On Fri, Sep 11, 2009 at 7:40 PM, Matthias K. wrote: > Hi, > > Its quite a while since i last used the "as" Keyword but it seems to > be broke somehow. > In the following code i've got a compiler error: Illegal parameter &g

[fpc-pascal] as keyword behaivor

2009-09-11 Thread Matthias K.
Hi, Its quite a while since i last used the "as" Keyword but it seems to be broke somehow. In the following code i've got a compiler error: Illegal parameter list in the line with the star, at the opening Brace. A Cast ( T8BSetObject(ASet).FSet ... ) works fine. -- type TBaseSet = set of Char;