Re: [fpc-pascal] procedure variable and inc/dec procedures

2012-01-17 Thread Howard Page-Clark
On 17/1/12 9:47, ik wrote: var a : procedure(var x : TOrdinal); b : procedure(var x : integer); begin a := @inc; b := @dec; Why doesn't the compiler like the above code ? Inc and Dec are internal compiler routines, more like macros than true functions. They are not coded as li

[fpc-pascal] procedure variable and inc/dec procedures

2012-01-17 Thread ik
Hello, I'm trying to do the following: - var a : procedure(var x : TOrdinal); b : procedure(var x : integer); begin a := @inc; b := @dec; end. --- I simplified the original code of mine to this specific example to make it more clear. At variable a, I get the following

Re: [fpc-pascal] Re: Help!!

2012-01-17 Thread Mattias Gaertner
Andreas Schneider hat am 17. Januar 2012 um 16:08 geschrieben: > On Tuesday, January 17, 2012, at 13:15 Felipe Monteiro de Carvalho wrote: > > If the use case is closing the main form without quitting the > > application, then I would prefer a property > > TApplication.QuitApplicationWhenMainFor

Re: [fpc-pascal] Re: Help!!

2012-01-17 Thread Andreas Schneider
On Tuesday, January 17, 2012, at 13:15 Felipe Monteiro de Carvalho wrote: > If the use case is closing the main form without quitting the > application, then I would prefer a property > TApplication.QuitApplicationWhenMainFormCloses or something like that. My current use case is: - show a login f

Re: [fpc-pascal] Postscriptcanvas

2012-01-17 Thread Felipe Monteiro de Carvalho
I think I was wrong about the nogui LCL widgetset. It should probably be able to run the unit Postscriptcanvas and require no X11. Another option would be adding postscript output to fpvectorial. It has postscript input at the moment but not output: http://wiki.lazarus.freepascal.org/fpvectorial

Re: [fpc-pascal] Postscriptcanvas

2012-01-17 Thread michael . vancanneyt
On Tue, 17 Jan 2012, Mattias Gaertner wrote: Felipe Monteiro de Carvalho hat am 17. Januar 2012 um 13:59 geschrieben: On Tue, Jan 17, 2012 at 1:40 PM, David Copeland wrote: I had not thought that approach (a non-visual lcl program) to be possible, but I will try it. Would I use the Nogui

Re: [fpc-pascal] MySQL5

2012-01-17 Thread michael . vancanneyt
On Tue, 17 Jan 2012, ik wrote: Most people don't notice this, since all distributions recompile everything that depends on MySQL from scratch anyway. But for FPC, the case is different. MySQL is "deprecated", and there are several open source projects that uses the same code base, but try

Re: [fpc-pascal] Postscriptcanvas

2012-01-17 Thread David Copeland
Okay, I now understand the distinction between printing and drawing. Using the LCL was only necessary to use it's Postscriptcanvas as that is what I'm familiar with. But as this program needs to be able to run without X, I will either puzzle out the FCL's fpcanvas, or just write the postscript myse

Re: [fpc-pascal] MySQL5

2012-01-17 Thread ik
On Tue, Jan 17, 2012 at 15:19, wrote: > > > On Tue, 17 Jan 2012, Mattias Gaertner wrote: > > >> michael.vancann...@wisa.be hat am 17. Januar 2012 um 13:28 geschrieben: >> >> >>> >>> On Tue, 17 Jan 2012, Mattias Gaertner wrote: >>> >>> Hi, I tried connecting to a mysql 5.5 database and

Re: [fpc-pascal] Postscriptcanvas

2012-01-17 Thread Mattias Gaertner
Felipe Monteiro de Carvalho hat am 17. Januar 2012 um 13:59 geschrieben: > On Tue, Jan 17, 2012 at 1:40 PM, David Copeland > wrote: > > I had not thought that approach (a non-visual lcl program) to be > > possible, but I will try it. Would I use the Nogui widgetset? > > No, it doesn't implement

Re: [fpc-pascal] MySQL5

2012-01-17 Thread michael . vancanneyt
On Tue, 17 Jan 2012, Mattias Gaertner wrote: michael.vancann...@wisa.be hat am 17. Januar 2012 um 13:28 geschrieben: On Tue, 17 Jan 2012, Mattias Gaertner wrote: Hi, I tried connecting to a mysql 5.5 database and used the fpc unit mysql51. There are only examples for 3 and 4, so I st

Re: [fpc-pascal] Postscriptcanvas

2012-01-17 Thread Felipe Monteiro de Carvalho
On Tue, Jan 17, 2012 at 1:40 PM, David Copeland wrote: > I had not thought that approach (a non-visual lcl program) to be > possible, but I will try it. Would I use the Nogui widgetset? No, it doesn't implement printing. > Would such a program run on a host where X was not installed? No > I am

Re: [fpc-pascal] MySQL5

2012-01-17 Thread Mattias Gaertner
michael.vancann...@wisa.be hat am 17. Januar 2012 um 13:28 geschrieben: > > > On Tue, 17 Jan 2012, Mattias Gaertner wrote: > > > Hi, > > > > I tried connecting to a mysql 5.5 database and used the fpc unit mysql51. > > There are only examples for 3 and 4, so I started with testdb4.pp and > > adap

Re: [fpc-pascal] MySQL5

2012-01-17 Thread Marco van de Voort
In our previous episode, michael.vancann...@wisa.be said: > > There are only examples for 3 and 4, so I started with testdb4.pp and > > adapted it. > > It turned out that the MYSQL record is missing some new fields, so the > > mysql_init overwrites the memory behind. > > After adding some dummy byt

Re: [fpc-pascal] Postscriptcanvas

2012-01-17 Thread David Copeland
Hi Felipe, I had not thought that approach (a non-visual lcl program) to be possible, but I will try it. Would I use the Nogui widgetset? Would such a program run on a host where X was not installed? I am targeting only Linux. I save the output to a file (SaveToFile). The user prints the file if n

Re: [fpc-pascal] MySQL5

2012-01-17 Thread michael . vancanneyt
On Tue, 17 Jan 2012, Mattias Gaertner wrote: Hi, I tried connecting to a mysql 5.5 database and used the fpc unit mysql51. There are only examples for 3 and 4, so I started with testdb4.pp and adapted it. It turned out that the MYSQL record is missing some new fields, so the mysql_init overwr

[fpc-pascal] MySQL5

2012-01-17 Thread Mattias Gaertner
Hi, I tried connecting to a mysql 5.5 database and used the fpc unit mysql51. There are only examples for 3 and 4, so I started with testdb4.pp and adapted it. It turned out that the MYSQL record is missing some new fields, so the mysql_init overwrites the memory behind. After adding some dummy by

Re: [fpc-pascal] Re: Help!!

2012-01-17 Thread Felipe Monteiro de Carvalho
If the use case is closing the main form without quitting the application, then I would prefer a property TApplication.QuitApplicationWhenMainFormCloses or something like that. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] Re: Help!!

2012-01-17 Thread Mattias Gaertner
Andreas Schneider hat am 17. Januar 2012 um 11:23 geschrieben: > On Sunday, January 15, 2012, at 15:04 Mattias Gaertner wrote: > > On Sun, 15 Jan 2012 05:58:21 -0800 (PST) > > Malvin wrote: > > >> So far i've managed to do the program quite well, and I was wondering, can > >> i close the main f

Re: [fpc-pascal] Advanced Records - Why not available by default?

2012-01-17 Thread Felipe Monteiro de Carvalho
On Sun, Jan 15, 2012 at 12:59 AM, Lars wrote: > Personally, I'm getting sick of all the new features added to delphi that > don't add anything meaningful, and just add complexity to the compiler. Why is compiler complexity relevant (if true at all that the new features add significant complexity)

Re: [fpc-pascal] Postscriptcanvas

2012-01-17 Thread Felipe Monteiro de Carvalho
If you are trying to print, why do you want to use PostScriptCanvas directly? Are you targeting only UNIXes? How will you connect the generated postscript to the printer? You have your own code for that? I would recommend that you use the LCL in your project and print via the Printer object, as no

Re: [fpc-pascal] Re: Help!!

2012-01-17 Thread Andreas Schneider
On Sunday, January 15, 2012, at 15:04 Mattias Gaertner wrote: > On Sun, 15 Jan 2012 05:58:21 -0800 (PST) > Malvin wrote: >> So far i've managed to do the program quite well, and I was wondering, can >> i close the main form (form1) whils opening form2 and not closing the app? >> Is there any way

Re: [fpc-pascal] Would someone be willing to build the skeleton of a simple application for me?

2012-01-17 Thread Sven Barth
Am 16.01.2012 23:33, schrieb hdv.ja...@gmail.com: So here's my request: would someone be willing to get me started by building the basics when given the specs? Basically it concerns a sqlite database with just three tables (each with four or less fields) and the interface to query and manipulate

Re: [fpc-pascal] convert "epoch" to UTC

2012-01-17 Thread Sven Barth
Am 16.01.2012 23:57, schrieb waldo kitty: anyway, the format is like this... *_TLE Epoch Format_* eg: 12013.93338171 1. there are always 5 digits to the left of the decimal. the first two digits are the year of the epoch. if year<57 then year:=year+2000 else year:=year+1900 in the above, 12