Re: [fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-07 Thread Graeme Geldenhuys
On 08/09/2011, Marco van de Voort wrote: > > The inner plumbing of executeprocess and tprocess should be the same. > TProcess just has several options (shell and piping) I thought of that, right after I sent my message. But maybe there is a slim chance that he is simply not using ExecuteProcess()

Re: [fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-07 Thread Marco van de Voort
In our previous episode, brian said: > What's driving me crazy is that running the two commands via > ExecuteProcess does the first step OK, but oggenc fails with an exit > code of 1, operation not permitted. > > If I replace the ExecuteProcess with a call to fpSystem, concatenating > the Comma

Re: [fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-07 Thread brian
On 09/08/2011 02:20 AM, Graeme Geldenhuys wrote: I can't really answer you regarding why ExecuteProcess doesn't work. But just wanted to ask: Have you thought of trying TProcess instead? I normally execute any external programs via TProcess with good results - no matter the platform. Nope. I'l

Re: [fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-07 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > I can't really answer you regarding why ExecuteProcess doesn't work. > But just wanted to ask: Have you thought of trying TProcess instead? I > normally execute any external programs via TProcess with good results > - no matter the platform. The i

Re: [fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-07 Thread Graeme Geldenhuys
I can't really answer you regarding why ExecuteProcess doesn't work. But just wanted to ask: Have you thought of trying TProcess instead? I normally execute any external programs via TProcess with good results - no matter the platform. Regards, - Graeme - On 08/09/2011, brian wrote: > Reinfor

[fpc-pascal] How to detect supported data types in dataset?

2011-09-07 Thread Reinier Olislagers
Hi list, Possible newbie question so feel free to educate me ;) (Away for some days, so may not read response until back) A patch by Ludo Brands on bufdataset (mantis 19930) got me thinking: const ftSupported = [ftString,ftGuid,... and so on]; procedure TCustomBufDataset.CreateDataset; var i:

CSVExport: was Re: [fpc-pascal] DBF Field name length and fpdbfexport

2011-09-07 Thread Reinier Olislagers
On 6-9-2011 9:14, Reinier Olislagers wrote: > On 6-9-2011 8:32, Michael Van Canneyt wrote: >> On Tue, 6 Sep 2011, Reinier Olislagers wrote: >>> Also, creating a Lazarus XMLSDExport component, and possibly >>> rewriting CSVexport to use sdfdata, so it needs less code >>> (current code basically dupl

[fpc-pascal] Linux - ExecuteProcess versus fpSystem

2011-09-07 Thread brian
Reinforcing the subject, this is using Linux - to be specific, FPC 2.4.2-0 under 64 bit Mint 9. I'm trying to convert a large number of MP3 files to Ogg Vorbis. This is a two step process, first I run mpg321 to switch them to a .wav file, then oggenc to convert to a .ogg What's driving me cr

Re: [fpc-pascal] 2 bugs ???

2011-09-07 Thread Yann Bat
2011/9/7 Leonardo M. Ramé : > From: Yann Bat > > > The error message is correct, because inside the scope of method  Bug, _T > points to nil, and the size of nil is 0, so 1 div 0 raises the error. > I think that SizeOf(_T) should be unknown rather than 0. The compiler should not make any ass

Re: [fpc-pascal] 2 bugs ???

2011-09-07 Thread Leonardo M . Ramé
From: Yann Bat >To: "fpc-pascal@lists.freepascal.org" >Sent: Wednesday, September 7, 2011 11:36 AM >Subject: [fpc-pascal] 2 bugs ??? > >Hi, > >I am trying to learn freepascal generics and I think that I have found 2 bugs. > >Tested with FPC 2.4.4 Linux x86 > >== >= BUG 1 - with Si

Re: [fpc-pascal] 2 bugs ???Q

2011-09-07 Thread Yann Bat
Thanks. You've just found bug number 3 ! :-) But #1 and #2 are alway here. 2011/9/7 Marco van de Voort : > In our previous episode, Yann Bat said: >> I am trying to learn freepascal generics and I think that I have found 2 >> bugs. > >> var >>   V: TGenInt; >> begin >>   V.Create(589); > > Thi

Re: [fpc-pascal] 2 bugs ???Q

2011-09-07 Thread Marco van de Voort
In our previous episode, Yann Bat said: > I am trying to learn freepascal generics and I think that I have found 2 bugs. > var > V: TGenInt; > begin > V.Create(589); This is no pascal way of creating a class. Use v:=tgenint.create; ___ fpc-pascal m

[fpc-pascal] 2 bugs ???

2011-09-07 Thread Yann Bat
Hi, I am trying to learn freepascal generics and I think that I have found 2 bugs. Tested with FPC 2.4.4 Linux x86 == = BUG 1 - with SizeOf = == program SizeOfBug; {$mode objfpc}{$H+} type generic TGen<_T> = class(TObject) private FField: _T; publ