Re: [fpc-pascal] How to solve variable does not seem to be initialized compiler hint.

2009-11-20 Thread Graeme Geldenhuys
Rainer Stratmann wrote: But how do you solve the hints where a variable is initialised by a function call with a var in the parameters then? :-) That the exact problem I have and the reason for this message thread. In the due, I had to create a local work-around due to the fact that FPC

hint free [Re: [fpc-pascal] How to solve variable does not seem to be initialized compiler hint.]

2009-11-20 Thread Martin
Graeme Geldenhuys wrote: Rainer Stratmann wrote: But how do you solve the hints where a variable is initialised by a function call with a var in the parameters then? :-) That the exact problem I have and the reason for this message thread. So I have a solution, but I consider

Re: [fpc-pascal] One experience with the unit serial

2009-11-20 Thread Holger Bruns
Jonas Maebe schrieb: On 19 Nov 2009, at 14:30, Holger Bruns wrote: Since iopl is still not available to fpc in its 64-bit-version, I should move to c for future port programming. $ man iopl ... This call is mostly for the i386 architecture. On many other architec- tures it

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Michael Van Canneyt
On Thu, 19 Nov 2009, Graeme Geldenhuys wrote: Bruce Bauman wrote: I'm porting some code which beeps the console. When I use sysutils.beep() it doesn't work under Linux. Looking at it's implementation in FPC 2.4.0-rc1 (Linux) I can indeed see why it doesn't beep. :-)

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Jonas Maebe
On 20 Nov 2009, at 11:51, Michael Van Canneyt wrote: No, because you don't know if a terminal is available or whether standard output is writable. And I guess that if the crt unit is used, it would just put some strange character on the screen. Jonas

Re: hint free [Re: [fpc-pascal] How to solve variable does not seem to be initialized compiler hint.]

2009-11-20 Thread Vincent Snijders
Graeme Geldenhuys schreef: Another very annoying hint! :-) Solution - apply yet more workarounds. FPC sure is verbal! It is Friday again: To show that you are looking for problems with more than enough solutions ... Option #1: -- procedure TForm.FormCreate(Sender: TObject);

Re: [fpc-pascal] One experience with the unit serial

2009-11-20 Thread Henry Vermaak
2009/11/20 Holger Bruns holger.br...@gmx.net: Jonas Maebe schrieb: On 19 Nov 2009, at 14:30, Holger Bruns wrote: Since iopl is still not available to fpc in its 64-bit-version, I should move to c for future port programming. $ man iopl ...      This call is mostly for the i386

Re: hint free [Re: [fpc-pascal] How to solve variable does not seem to be initialized compiler hint.]

2009-11-20 Thread Graeme Geldenhuys
Vincent Snijders wrote: For you as Lazarus user there is another option: Compiler options - Verbosity - uncheck Show hints for parameter Sender not used Thanks Vincent, I did not know about this option. I guess it's type I work my way through all the dialogs in Lazarus IDE to see what is new.

Re: [fpc-pascal] How to solve variable does not seem to be initialized compiler hint.

2009-11-20 Thread Rainer Stratmann
Am Friday 20 November 2009 09:42:16 schrieb Graeme Geldenhuys: Either way, my code is working now and is hint free. I thought it is impossible, but you give me hope... Rainer Regards, - Graeme - ___ fpc-pascal maillist -

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Graeme Geldenhuys
Michael Van Canneyt wrote: No, because you don't know if a terminal is available or whether standard output is writable. As far as I know stdout is always available for Linux. Even if I compile applications for X11 and launch them from a desktop icon, I can do writeln() calls without problems

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: No, because you don't know if a terminal is available or whether standard output is writable. As far as I know stdout is always available for Linux. Even if I compile applications for X11 and launch them from a desktop icon, I can do

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Michael Van Canneyt
On Fri, 20 Nov 2009, Graeme Geldenhuys wrote: Michael Van Canneyt wrote: No, because you don't know if a terminal is available or whether standard output is writable. As far as I know stdout is always available for Linux. Even if I compile applications for X11 and launch them from a

Re[2]: [fpc-pascal] How to solve variable does not seem to be initialized compiler hint.

2009-11-20 Thread JoshyFun
Hello Graeme, Friday, November 20, 2009, 9:42:16 AM, you wrote: GG I created a local dcpFillChar() which uses a out parameter. Inside the GG implementation of dcpFillChar() I enabled {$HINTS OFF}, and then called GG FPC's FillChar(). I had not tested it but you can create a general

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Graeme Geldenhuys
Michael Van Canneyt wrote: No, the application can (for instance almost all daemons do) close stdout. Programs that use ncurses will also be messed-up. Ah, ok. For CGI programs, stdout is also reserved for the HTML output. Imagine someone else's code doing a beep, and it ends up in your

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Michael Van Canneyt
On Fri, 20 Nov 2009, Graeme Geldenhuys wrote: Michael Van Canneyt wrote: No, the application can (for instance almost all daemons do) close stdout. Programs that use ncurses will also be messed-up. Ah, ok. For CGI programs, stdout is also reserved for the HTML output. Imagine someone

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: Possible alternatives: Maybe under Linux the system.beep() can make a sound if stdout is available, otherwise write the word beep to the console (like the old silent movies did on screen), or flash the Scroll Lock keyboard light. :-) Sure. How

[fpc-pascal] FPC equivalent to system under Linux

2009-11-20 Thread Bruce Bauman
I'm porting some code which called system. Is there an equivalent under FPC, or do I need to use FpFork/FpExecV? -- Bruce CONFIDENTIALITY NOTICE: This e-mail is confidential and intended solely for the use of the individual or entity to which it is addressed. If you are not the intended

Re: [fpc-pascal] FPC equivalent to system under Linux

2009-11-20 Thread Marco van de Voort
In our previous episode, Bruce Bauman said: I'm porting some code which called system. Is there an equivalent under FPC, or do I need to use FpFork/FpExecV? unix.fpsystem both with short annd ansistring arguments. ___ fpc-pascal maillist -

Re: suppressing hints[Re: [fpc-pascal] How to solve variable does not seem to be initialized compiler hint.]

2009-11-20 Thread Jürgen Hestermann
That's the idea of hints. Telling you you need to look at the code once, and if it's ok = good. But if the hint was correct = fix it. But if you later change your code it may become not ok again. I don't think that this is good working practice. I would prefer to have the compiler recognize

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Jorge Aldo G. de F. Junior
arent there a /dev/something device for pcspeaker ? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] convert st_mtime from BaseUnix.FpStat to year, month, day, hour, minute, sec

2009-11-20 Thread Bruce Bauman
I need to convert the st_time field of the record returned by BaseUnix.FpStat to the year, month, day, hour, minute and second and need to compensate for the local timezone. I've read over the RTL documentation and am thoroughly confused. Some of the documentation of the interfaces say that

Re: [fpc-pascal] convert st_mtime from BaseUnix.FpStat to year, month, day, hour, minute, sec

2009-11-20 Thread Jonas Maebe
On 20 Nov 2009, at 23:49, Bruce Bauman wrote: I need to convert the st_time field of the record returned by BaseUnix.FpStat to the year, month, day, hour, minute and second and need to compensate for the local timezone. The dateutils unit contains the following functions that you can use:

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-20 Thread Martin Schreiber
On Friday 20 November 2009 21:24:17 Jorge Aldo G. de F. Junior wrote: arent there a /dev/something device for pcspeaker ? With X11 one can use xbell(). Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] MSEide+MSEgui rev. 2.2beta2

2009-11-20 Thread Martin Schreiber
Hi, MSEide+MSEgui rev. 2.2beta2 for FPC 2.2.4 and 2.4 has been released: http://sourceforge.net/projects/mseide-msegui/files/ There is an experimental x84_64_linux version too. Questions and bug reports please to NNTP: news://news.grid-sky.com/public.mseide-msegui.talk Martin