Re: [fpc-pascal] Problem with c header conversion

2009-01-04 Thread dmitry boyarintsev
each union is a separate case for pascal. another thing is that the structure is quite agly and does not reveale the logicals usage. The problem is that pascal does not allow you to use multiple cases in single record, that would require you to declare additional types. _PFColorSize = record

Re: [fpc-pascal] TProcess.CommandLine 255 fails

2009-01-04 Thread Jürgen Hestermann
procedure Run_Command_Wait(TheCommand : string); cdecl; This 'string' is of the type shortstring, and thus will truncate your string to 255 characters. Change it in ansistring or add {$H+} to the beginning of your program. I would advice to declare TheCommand : AnsiString instead of changing

Re: [fpc-pascal] Debugger support for FP (issues with libgdb.a)

2009-01-04 Thread Andrea
Jonas Maebe wrote: On 04 Jan 2009, at 16:51, Andrea wrote: My gdb is version 6.8, on your link I can only find 6.2.1 Will that be a problem when it runs? No: libgdb.a basically contains a complete gdb implementation in that library, and the IDE will use that. It's not an interface to

Re: [fpc-pascal] property of an array

2009-01-04 Thread Joost van der Sluis
Op zaterdag 03-01-2009 om 19:04 uur [tijdzone -0500], schreef Jeremy Cowgar: myObj.ColumnNames := [ 'Id', 'Name', 'Age' ]; Error: Ordinal expression expected A list of values between square brackets are a set, not an array. You'll have to do: AnArray[0] := 'Id'; anArray[1] :=

Re: [fpc-pascal] TProcess.CommandLine 255 fails

2009-01-04 Thread T.Guilleminot
Please provide a compilable program that demonstrates the problem. Jonas Create a myini.ini file containing : [TEST] CMD_OK=echo 'Hello !' CMD_NOT_OK=mencoder dvb://M6 -sws 9 -of lavf -lavfopts format=mp4 -vf scale=480:320,dsize=480:320,harddup -ovc x264 -x264encopts

[fpc-pascal] Problem with c header conversion

2009-01-04 Thread gabor
Hello, I'm trying to convert c header code from Windows Mobile API 5 to pascal and I'm getting wrong size of converted record: original c header: typedef struct _DDPIXELFORMAT { DWORD dwSize; DWORD dwFlags; DWORD dwFourCC; union { DWORD

Re: [fpc-pascal] Debugger support for FP (issues with libgdb.a)

2009-01-04 Thread Jonas Maebe
On 04 Jan 2009, at 16:51, Andrea wrote: My gdb is version 6.8, on your link I can only find 6.2.1 Will that be a problem when it runs? No: libgdb.a basically contains a complete gdb implementation in that library, and the IDE will use that. It's not an interface to your system-installed

Re: [fpc-pascal] TProcess.CommandLine 255 fails

2009-01-04 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: 2.2.x or 2.3.x? I used the 2.2.0 (provided by Ubuntu repositories). Then I just upgraded and tested in 2.2.2-8 but problem is still the same :( Please provide a compilable program that demonstrates the problem. (Jonas: I asked because I

Re: [fpc-pascal] Debugger support for FP (issues with libgdb.a)

2009-01-04 Thread Joost van der Sluis
Op zondag 04-01-2009 om 15:51 uur [tijdzone +], schreef Andrea: Joost van der Sluis wrote: Op maandag 22-12-2008 om 23:17 uur [tijdzone +], schreef Andrea: Joost van der Sluis wrote: Op zondag 21-12-2008 om 17:29 uur [tijdzone +], schreef Andrea: Apparently it cannot work

Re: [fpc-pascal] TProcess.CommandLine 255 fails

2009-01-04 Thread Joost van der Sluis
Op zondag 04-01-2009 om 12:31 uur [tijdzone +0100], schreef T.Guilleminot: procedure Run_Command_Wait(TheCommand : string); cdecl; This 'string' is of the type shortstring, and thus will truncate your string to 255 characters. Change it in ansistring or add {$H+} to the beginning of your

Re: [fpc-pascal] Problem with c header conversion

2009-01-04 Thread Jonas Maebe
On 03 Jan 2009, at 12:54, gabor wrote: I'm trying to convert c header code from Windows Mobile API 5 to pascal and I'm getting wrong size of converted record: original c header: typedef struct _DDPIXELFORMAT { DWORDdwSize; DWORDdwFlags; DWORDdwFourCC;

Re: [fpc-pascal] property of an array

2009-01-04 Thread dmitry boyarintsev
1) type StringArray : array of String; defines a StringArray type to be dynamic array. are you sure, that you have SetColumnNames defined as procedure SetColumnNames(names : StringArray); rather than: procedure SetColumnNames(names : array of string); ??? because if you have procedure

Re: [fpc-pascal] property of an array

2009-01-04 Thread Jeremy Cowgar
dmitry boyarintsev wrote: 1) type StringArray : array of String; defines a StringArray type to be dynamic array. are you sure, that you have SetColumnNames defined as procedure SetColumnNames(names : StringArray); rather than: procedure SetColumnNames(names : array of string); ??? Hm, you