Re: [fpc-pascal] FPC releases for Win64 - 2.6.2 & 2.6.4 versus 3.0.0

2016-04-07 Thread Marco van de Voort
In our previous episode, Dimitrios Chr. Ioannidis said: > 2016-04-07 19:07, Graeme Geldenhuys ??: > > How do I know if a program (executable) is 32-bit or 64-bit under > > Windows? Using Unix-like OSes, I can simply use the "file" > > command. What is the equivalent under Windows? >

Re: [fpc-pascal] FPC releases for Win64 - 2.6.2 & 2.6.4 versus 3.0.0

2016-04-07 Thread Dimitrios Chr. Ioannidis
Hi Graeme, Στις 2016-04-07 19:07, Graeme Geldenhuys έγραψε: How do I know if a program (executable) is 32-bit or 64-bit under Windows? Using Unix-like OSes, I can simply use the "file" command. What is the equivalent under Windows? you can use file ;) http://gnuwin32.sourceforge.net/pa

Re: [fpc-pascal] FPC releases for Win64 - 2.6.2 & 2.6.4 versus 3.0.0

2016-04-07 Thread Graeme Geldenhuys
On 2016-04-07 17:11, Michael Van Canneyt wrote: > > The windows team doesn't think there are sufficient reasons/arguments > for a 64-bit native compiler. Lazy buggers! ;-) > (So, I roll my own. Luckily, this is not that hard) I'll do the same, thanks. >> How do I know if a program (executab

Re: [fpc-pascal] FPC releases for Win64 - 2.6.2 & 2.6.4 versus 3.0.0

2016-04-07 Thread Michael Van Canneyt
On Thu, 7 Apr 2016, Graeme Geldenhuys wrote: Hi, No my Win64 VM I have FPC 2.6.2 and 2.6.4 installed using the official FPC installers. For example: fpc-2.6.4.x86_64-win64.exe I wanted to upgrade my VM to FPC 3.0.0, but I don't seem to find an official Win64 release like prior versions. All

[fpc-pascal] FPC releases for Win64 - 2.6.2 & 2.6.4 versus 3.0.0

2016-04-07 Thread Graeme Geldenhuys
Hi, No my Win64 VM I have FPC 2.6.2 and 2.6.4 installed using the official FPC installers. For example: fpc-2.6.4.x86_64-win64.exe I wanted to upgrade my VM to FPC 3.0.0, but I don't seem to find an official Win64 release like prior versions. All I can find as a what I assume is a 32-bit cross-c

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Martin Schreiber
On Thursday 07 April 2016 16:20:16 Santiago A. wrote: > El 07/04/2016 a las 14:00, Luiz Americo Pereira Camara escribió: > > I enconter the following pattern frequently (simplified): > > > > SQL: > > Select * From Customers Where FieldX = 1 > > > > Later i need a similar query that uses a different

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Marcos Douglas
On Thu, Apr 7, 2016 at 12:30 PM, Luiz Americo Pereira Camara wrote: > Thanks for all the responses > > The Marcos' one is particular interesting since goes in a direction a did > not think earlier Thanks. I do this for years. The major advantage, I think, is doesn't need to change the SQL in pie

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Luiz Americo Pereira Camara
Thanks for all the responses The Marcos' one is particular interesting since goes in a direction a did not think earlier Luiz 2016-04-07 12:06 GMT-03:00 Graeme Geldenhuys : > On 2016-04-07 13:47, Michael Thompson wrote: > > This moves it up that list... > > I can give you many more reason to m

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Graeme Geldenhuys
On 2016-04-07 13:47, Michael Thompson wrote: > This moves it up that list... I can give you many more reason to move it up even further. ;-) tiOPF is a treasure trove of goodies (for DB and non-DB projects). Regards, - Graeme - ___ fpc-pascal maillis

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Santiago A.
El 07/04/2016 a las 14:00, Luiz Americo Pereira Camara escribió: > I enconter the following pattern frequently (simplified): > > SQL: > Select * From Customers Where FieldX = 1 > > Later i need a similar query that uses a different filter like > > Select * From Customers Where FieldX = 1 and FieldY

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Marcos Douglas
On Thu, Apr 7, 2016 at 9:00 AM, Luiz Americo Pereira Camara wrote: > > I enconter the following pattern frequently (simplified): > > SQL: > Select * From Customers Where FieldX = 1 > > Later i need a similar query that uses a different filter like > > Select * From Customers Where FieldX = 1 and F

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Michael Thompson
On 7 April 2016 at 20:20, Graeme Geldenhuys wrote: > On 2016-04-07 13:00, Luiz Americo Pereira Camara wrote: > > If there's not in pascal, someone knows such templating in another > > languages? The hard part is getting a flexible and functional syntax > > I have written such code for the tiOPF p

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Michael Thompson
On 7 April 2016 at 20:06, Luiz Americo Pereira Camara < luizameri...@gmail.com> wrote: > Any chance sharing the code or at least the syntax? (I realise I'm hijacking your conversation with Michael - apologies for that, but this interests me) My code to initialise the grid (which hides all _ID col

Re: [fpc-pascal] Class vs Object type

2016-04-07 Thread Adriaan van Os
Graeme Geldenhuys wrote: Are there pros or cons to either? The fashion of the day. Apparently, programmers are (supposed to be) not intelligent enough to work with pointers themselves -- if needed. So the compiler does that for you and declares everything a pointer automatically. Same with "

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Michael Thompson
On 7 April 2016 at 20:00, Luiz Americo Pereira Camara < luizameri...@gmail.com> wrote: > Is there any code that given a SQL Template would generate the second filter when paramy is available and keep blank when not available? Nope, or at least I don't think so. I've spent a long time looking as w

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Graeme Geldenhuys
On 2016-04-07 13:00, Luiz Americo Pereira Camara wrote: > If there's not in pascal, someone knows such templating in another > languages? The hard part is getting a flexible and functional syntax I have written such code for the tiOPF project, but it should be quick to detach any tiOPF dependencie

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Michael Van Canneyt
On Thu, 7 Apr 2016, Luiz Americo Pereira Camara wrote: 2016-04-07 9:03 GMT-03:00 Michael Van Canneyt : On Thu, 7 Apr 2016, Luiz Americo Pereira Camara wrote: Is there any code that given a SQL Template would generate the second filter when paramy is available and keep blank when not ava

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Luiz Americo Pereira Camara
2016-04-07 9:03 GMT-03:00 Michael Van Canneyt : > > > On Thu, 7 Apr 2016, Luiz Americo Pereira Camara wrote: > > >> Is there any code that given a SQL Template would generate the second >> filter when paramy is available and keep blank when not available? >> >> >> > I have not found such code. I r

Re: [fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Michael Van Canneyt
On Thu, 7 Apr 2016, Luiz Americo Pereira Camara wrote: I enconter the following pattern frequently (simplified): SQL: Select * From Customers Where FieldX = 1 Later i need a similar query that uses a different filter like Select * From Customers Where FieldX = 1 and FieldY = :paramy Is the

[fpc-pascal] Create dynamic SQL according to available params

2016-04-07 Thread Luiz Americo Pereira Camara
I enconter the following pattern frequently (simplified): SQL: Select * From Customers Where FieldX = 1 Later i need a similar query that uses a different filter like Select * From Customers Where FieldX = 1 and FieldY = :paramy Is there any code that given a SQL Template would generate the sec

Re: [fpc-pascal] Class vs Object type

2016-04-07 Thread Santiago A.
El 07/04/2016 a las 13:04, Graeme Geldenhuys escribió: > On 2016-04-07 11:58, Santiago A. wrote: >> Moreover, if the object uses classes instances that must be freed, you >> also must call destructor, then any advantage is over. > Technically yes, but as a rule of thumb, I *never* use Class objects

Re: [fpc-pascal] Class vs Object type

2016-04-07 Thread Graeme Geldenhuys
On 2016-04-07 11:58, Santiago A. wrote: > Moreover, if the object uses classes instances that must be freed, you > also must call destructor, then any advantage is over. Technically yes, but as a rule of thumb, I *never* use Class objects inside an Object object. That just seems messy. Regards,

Re: [fpc-pascal] Class vs Object type

2016-04-07 Thread Santiago A.
El 06/04/2016 a las 13:23, Graeme Geldenhuys escribió: > "The difference between objects and classes is mainly that an object is > allocated on the stack, as an ordinary record would be, and that classes > are always allocated on the heap." > > Are there pros or cons to either? > > Regards, > - G