[fpc-pascal] Cucumber and other testing framework

2010-01-25 Thread ik
Hello list, I wish to implement Cucumber http://cukes.info/ (a BDD based testing framework). It has a protocol that needs to be implemented: http://wiki.github.com/aslakhellesoy/cucumber/wire-protocol But I do not have time for it at the moment. Are there other testing framework (not counting

Re: [fpc-pascal] Cucumber and other testing framework

2010-01-25 Thread Graeme Geldenhuys
ik wrote: Are there other testing framework (not counting fpcunit), that written for Pascal/FPC ? Yes. See my full reply in the Lazarus mailing list. http://github.com/graemeg/dunit2 Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

Re: [fpc-pascal] LZMA Algorithm fails on 64bit

2010-01-25 Thread Matthias Klumpp
I think the code there is currently actually only correct on 64 bit platforms and wrong on 32 bit platforms: it seems that it should read an int64 in little endian format and converts it on-the-fly to the native endianess, but that currently only happens correctly on 64 bit platforms. I was

Re[2]: [fpc-pascal] LZMA Algorithm fails on 64bit

2010-01-25 Thread JoshyFun
Hello FPC-Pascal, Monday, January 25, 2010, 1:29:48 PM, you wrote: MK The problem is that no Pascal developer knows this code. It was translated MK from Java code. MK Can you imagine another difference between 64bit and 32bit which may cause MK those error? The bitshifts result in the same

Re: [fpc-pascal] LZMA Algorithm fails on 64bit

2010-01-25 Thread Jonas Maebe
On 25 Jan 2010, at 13:29, Matthias Klumpp wrote: I think the code there is currently actually only correct on 64 bit platforms and wrong on 32 bit platforms: it seems that it should read an int64 in little endian format and converts it on-the-fly to the native endianess, but that currently

Re: Re[2]: [fpc-pascal] LZMA Algorithm fails on 64bit

2010-01-25 Thread Matthias Klumpp
The stream is compressed with 32 bits version ? Or are the 64 bits compressed files the ones that fail to be decompressed in 64 bits also ? I cpmpressed a stream with the 64bits version. I can uncompress it successfully on 32bit, but not on 64bit. I haven't tried to decompress 32bit compressed

Re: [fpc-pascal] LZMA Algorithm fails on 64bit

2010-01-25 Thread Matthias Klumpp
Strange, apparently shl/shr are not automatically changed to 64 bit when compiling for a 64 bit platform. I don't know why that is the case. You can force a 64 bit shift by typecasting v to int64. At least the person who translated it supposedly knows it. Otherwise, you have to go back to

Re[4]: [fpc-pascal] LZMA Algorithm fails on 64bit

2010-01-25 Thread JoshyFun
Hello FPC-Pascal, Monday, January 25, 2010, 2:27:00 PM, you wrote: MK I cpmpressed a stream with the 64bits version. I can uncompress it MK successfully on 32bit, but not on 64bit. MK I haven't tried to decompress 32bit compressed files under 64bit, but MK decompressing files compressed under

Re: Re[4]: [fpc-pascal] LZMA Algorithm fails on 64bit

2010-01-25 Thread Matthias Klumpp
So the question a 32 bits compressed LZMA can be decompressed with 32 bits decode, and the same stream decompressed with the 64 bits version ? MK I'll try, but I think it won't work. I hope to have some spare time this afternoon to test it, as I also need LZMA decompress in 64 bit. I

[fpc-pascal] Cancelling Scientific notation

2010-01-25 Thread James Gibbens
Hallo FPC gurus, I am VERY new to free pascal and I have a couple of problems. Can somebody please help? 1. If a, b are real numbers and I want to round a/b foo to 3 decimal places, the answer is displayed in Scientific notation. How do I turn that off? 2. Without using Object Pascal, how can I

Re: [fpc-pascal] Cancelling Scientific notation

2010-01-25 Thread Anthony Walter
1) Format('%.3f', [A / B]); 2) It depends on you GUI framework/library, but in Delphi and Lazarus it would be Color := 0; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Cancelling Scientific notation

2010-01-25 Thread Frank Peelo
On 25/01/2010 18:37, James Gibbens wrote: Hallo FPC gurus, I am VERY new to free pascal and I have a couple of problems. Can somebody please help? 1. If a, b are real numbers and I want to round a/b foo to 3 decimal places, the answer is displayed in Scientific notation. How do I turn that

[fpc-pascal] Assigning class method to procedure of object via class name in delphi mode

2010-01-25 Thread cobines
Hi, I usually use objfpc mode, however I have a few units in delphi mode and don't know if it is a bug or normal delphi behaviour. In the following program I have variable of type procedure of object. If I assign a method of a class using object name: CM.Callback := CM.ContextMenuSelect;

Re: [fpc-pascal] Assigning class method to procedure of object via class name in delphi mode

2010-01-25 Thread Anthony Walter
No, the assignment shouldn't be allowed. The assignment to procedure of object should only be allowed from instances. SizeOf(TNotifyProc) = SizeOf(Pointer) * 2 See also: the TMethod record ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Assigning class method to procedure of object via class name in delphi mode

2010-01-25 Thread Michalis Kamburelis
cobines wrote: everything is ok. But I can also assign it using class name: CM.Callback := TContextMenu.ContextMenuSelect; This is the way it's supposed to work in delphi mode, as far as I remember Delphi allows it (disclaimer: I don't have Delphi now to check, but it used to be so around

Re: [fpc-pascal] LZMA Algorithm fails on 64bit

2010-01-25 Thread Graeme Geldenhuys
JoshyFun wrote: Found the bug in URangeDecoder.pas I am planning on using LZMA in the future (no timeframe available yet), but could you guys make the fixed code available somewhere in a repository or as a sub-project of Lazarus CCR? Otherwise others developers downloading the LZMA SDK from