Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-12 Thread Michael Müller
Am 12.02.2013 um 13:29 schrieb Giuliano Colla: > I've made some further experiments with my minimal test. > Test form is just a Form with a Close button (BitBtn Kind=bkClose). > The full code is the following: > > unit uinitfile; > > {$mode objfpc}{$H+} > > interface > > uses > Classes, SysU

Re: [fpc-pascal] TBufDataset broken in fixes_2_2

2008-11-16 Thread Michael Müller
Hi! Am 15.11.2008 um 16:56 schrieb Funky Beast: Hi, TBufDataset is broken in latest fixes_2_2. Can be reproduce with following code: var s: TSQLQuery; begin s := TSQLQuery; The example is correct without .Create()? s.Free; end; Compiling fcl-db with debug info, the above code excepts

[fpc-pascal] TStringList bug?

2010-04-07 Thread Michael Müller
Hi, the following code behaves different between Delphi and Free Pascal: {$APPTYPE CONSOLE} {$IFDEF FPC} {$MODE delphi} {$ENDIF} uses Classes; type TFoo = class(TStringList) public constructor Create; end; constructor TFoo.Create; begin inherited Create; {$IFDEF FPC} // Is needed by Fre

Re: [fpc-pascal] Questions regarding arrays

2010-09-22 Thread Michael Müller
Hi Graeme! Am 22.09.2010 um 11:25 schrieb Graeme Geldenhuys: > Hi, > > I'm have some tough times with arrays (I use them very little). With > trial and error I found that to use a pointer to an array of int32 > values returned by a C API (Xlib to be exact), I have to define it as > follows in Ob

Re: [fpc-pascal] fpc 32 / 64 bit / c++/ floating point question

2010-11-21 Thread Michael Müller
Am 21.11.2010 um 18:54 schrieb Helmut Hartl: > While stabilizing my bullet physics port i saw some differences in > floating point behaviour between c++ and fpc32 and fpc 64 bit. > > In question is a simple dot product. > > The function : > result := a*d+b*e+c*f; > > Gives "different" results(

Pointer to first dynamic array element (was: Re: [fpc-pascal] Correct use of var in function calls?)

2011-02-05 Thread Michael Müller
Hi Bo! Am 03.02.2011 um 22:53 schrieb Bo Berglund: > function TSSCommBuf.Read(var Data: TByteArr): boolean; // <== ??? > begin > Result := Read(@Data, SizeOf(Data)) = SizeOf(Data); > end; When using dynamic arrays @Data will not be the address of the first array element which is usually what y

Re: [fpc-pascal] how to test if a file is open to write?

2011-07-14 Thread Michael Müller
Hi Bernd Am 13.07.2011 um 21:06 schrieb Bernd: > Because I have no idea how to do this properly (It has been a hundred > years since I last used this form of file IO in Pascal) I have done > the following hack, just to get it running somehow but now I wonder > what would be the proper way to do t

[fpc-pascal] TStringStream

2011-07-16 Thread Michael Müller
Hi, in rtl\objpas\classes\classesh.inc TStringStream is derived from TStream. It seems there was a time when this was valid: http://delphi.wikia.com/wiki/TStringStream_Class. But in Delphi (at least 2009 and higher) TStringStream derives from TBytesStream which derives from TMemoryStream: http

Re: [fpc-pascal] How are Assigned, Free, Nil and Destroy related?

2011-10-22 Thread Michael Müller
Am 22.10.2011 um 09:08 schrieb Frank Church: > > > On 22 October 2011 07:20, Felipe Monteiro de Carvalho > wrote: > I understand Assigned as being the same as <> nil, so Assigned(Object) > = Object <> nil > > I vaguely remember that it could be safer in some corner case, but I > don't rememb

Re: [fpc-pascal] memory corruption

2012-01-25 Thread Michael Müller
Am 26.01.2012 um 03:50 schrieb ik: > Hello, > > While testing my following code: > https://github.com/ik5/redis_client.fpc/blob/master/tests/test_parser.lpr#L166 > > When I'm executing the code on the second item (that is suppose to be null in > the protocol -> '$-1#13#10'), > the program cras

[fpc-pascal] How to run FPC 2.x on QNX

2006-02-20 Thread Michael Müller
Hi, we are developing a console application under Delphi. The main task is to use it under Windows. But there are some situations where we need to run it under the realtime OS QNX. This is the reason why we use FPC 1.0.x. But it lacks some interesting features like dynamic arrays. I know that QNX

Re: [fpc-pascal] const parameter writeable

2006-04-30 Thread Michael Müller
On Sat, Apr 29, 2006 at 11:20:04PM +0200, Peter Vreman <[EMAIL PROTECTED]> wrote: > > > > Are const parameters supposed to ensure read only access? > > If so how come one can write to a typed pointer? > > > > program project1; > > > > {$mode objfpc}{$H+} > > > > type > > PSomeRec = ^TSomeRec

Re: [fpc-pascal] const parameter writeable

2006-05-01 Thread Michael Müller
On Mon, May 01, 2006 at 12:07:55PM -0600, L505 <[EMAIL PROTECTED]> wrote: > > > > Only the pointer itself is the parameter and read-only. Where the pointer > > > points to is irrelevant. > > I remember this from using classes where you can still access the class > properties - > should have thou

[fpc-pascal] Constant object

2006-05-01 Thread Michael Müller
How can I declare a constant object? var MyTest: TObject; begin MyTest := TObject.Create; end. works (for sure). How can I declare 'const'? Thanks Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mai

Re: [fpc-pascal] serial.pp - I can't talk to modem

2008-01-03 Thread Michael Müller
Am 02.01.2008 um 15:39 schrieb Bernd Mueller: Graeme Geldenhuys wrote: SerWrite(serialhandle, s, Length(s)); SerWrite(serialhandle, s[1], Length(s)); Why not adding an overloaded SerWrite() that simply expects a string? procedure SerWrite(handle, string); begin SerWrite(handle, strin