Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?
On Saturday 21 November 2009 08:56:53 Martin Schreiber wrote: > On Friday 20 November 2009 21:24:17 Jorge Aldo G. de F. Junior wrote: > > arent there a /dev/something device for pcspeaker ? /dev/pcspkr > > With X11 one can use xbell(). > > Martin > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?
The joys of Linux. I have neither /dev/pcspkr or xbell available on my Ubuntu 9.08.2 system. :-( Graeme. On 21/11/2009, fpcl...@silvermono.co.za wrote: > On Saturday 21 November 2009 08:56:53 Martin Schreiber wrote: >> On Friday 20 November 2009 21:24:17 Jorge Aldo G. de F. Junior wrote: >> > arent there a /dev/something device for pcspeaker ? > /dev/pcspkr > >> >> With X11 one can use xbell(). >> >> Martin >> >> ___ >> fpc-pascal maillist - fpc-pascal@lists.freepascal.org >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?
Sorry about the typo - a slip of the hand. Make that Ubuntu 8.04.2 On 21/11/2009, Graeme Geldenhuys wrote: > The joys of Linux. I have neither /dev/pcspkr or xbell available on my > Ubuntu 9.08.2 system. :-( > > Graeme. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?
Michael Van Canneyt wrote: > > By that rationale: no beep() on linux. > Can beep be made a procvar? Regards, Andrew ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?
On Sat, 21 Nov 2009, Andrew Haines wrote: Michael Van Canneyt wrote: By that rationale: no beep() on linux. Can beep be made a procvar? I have been thinking along similar lines, and made an implementation for beep that works with a handler. It's not yet committed, as I was trying to make an LCL plugin which would work on Linux/X11. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Generic type declaration example versus manual.
Hello. In example tgeneric16.pp (from FPC 2.2.4 sources) the generic type TStack is declared as: type { TStack } generic TStack = class(TObject) public procedure Clear; virtual; destructor Destroy; override; end; Though in FPC manual type is described as: type declaration: identifier = type ; type: simple type string type structured type pointer type procedural type generic type specialized type type identifier generic type: generic identifier < template list > = generic class ; Following the manual, the type identifier is thus declared two times: - in type declaration - in generic type Like: TStack = generic TStack = class(TObject) public procedure Clear; virtual; destructor Destroy; override; end; The syntax found in the example doesn't take care of the first identifier in type declaration. May I suggest the following: TStack = generic class(TObject) public procedure Clear; virtual; destructor Destroy; override; end; This syntax looks like more Pascal conformant, i.e. it doesn't brake Pascal type declaration "identifier = type;" And this prevent the succession of greater and equal characters in "generic TStack=class(TObject)" which may be considered as greater or equal ">=" by the compiler. For sure, the simpler would be to change the manual ;-) What are your feedbacks ? Regards, Pascal. http://blady.pagesperso-orange.fr ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Generic type declaration example versus manual.
On 21 Nov 2009, at 19:00, Pascal wrote: > In example tgeneric16.pp (from FPC 2.2.4 sources) the generic type TStack is > declared as: tgeneric16.pp is not an example, it's a test. Moreover, it doesn't compile yet, not even with FPC 2.5.1. So documenting that syntax is not really a good idea. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Generic type declaration example versus manual.
Jonas Maebe wrote: tgeneric16.pp is not an example, it's a test. Moreover, it doesn't compile yet, not even with FPC 2.5.1. So documenting that syntax is not really a good idea. His comment doesn't really apply to tgeneric16 specifically, but more to generic syntax in general. Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Using C functions
Hi all, Is there any way to use a C library that use the __fastcall calling convention? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Using C functions
On 21 Nov 2009, at 20:16, Wimpie Nortje wrote: > Is there any way to use a C library that use the __fastcall calling > convention? Not at this time. Also note that that the fastcall convention is not standardised and varies between different C compilers. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Using C functions
Jonas Maebe wrote: On 21 Nov 2009, at 20:16, Wimpie Nortje wrote: Is there any way to use a C library that use the __fastcall calling convention? Not at this time. Also note that that the fastcall convention is not standardised and varies between different C compilers. Thanks, I thought so. I am considering to write a C library (cdecl) to wrap the calls to the C library(fastcall), but it doesn't feel right. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Using C functions
Wimpie Nortje schrieb: Jonas Maebe wrote: On 21 Nov 2009, at 20:16, Wimpie Nortje wrote: Is there any way to use a C library that use the __fastcall calling convention? Not at this time. Also note that that the fastcall convention is not standardised and varies between different C compilers. Thanks, I thought so. I am considering to write a C library (cdecl) to wrap the calls to the C library(fastcall), but it doesn't feel right. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal it's better to do it this way instead relying on something not standardised... ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Generic type declaration example versus manual.
I haven't used generics in FPC, but really have to ask, is they keyword generic really necessary? Shouldn't generics be declared like this: type TList = class private ... public function Add: T; procedure Remove(Item: T); property Item[Index: Integer]: T read Get write Put; default; end; I believe this makes the most sense, and it's also how they are declared in Delphi. It would be a real shame to create more Delphi incompatibilities. On Sat, Nov 21, 2009 at 1:24 PM, Micha Nelissen wrote: > Jonas Maebe wrote: >> >> tgeneric16.pp is not an example, it's a test. Moreover, it doesn't compile >> yet, not even with FPC 2.5.1. So documenting that syntax is not really a >> good idea. > > His comment doesn't really apply to tgeneric16 specifically, but more to > generic syntax in general. > > Micha > ___ > fpc-pascal maillist - fpc-pas...@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal