[fpc-pascal] Setting string to be UnicodeString by default
Hello all, Is there a way to force the string type to be an alias to UnicodeString instead of AnsiString as it is by default? I tried the obvious type string = UnicodeString but of course it is not allowed as string is a reserved keyword. Regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setting string to be UnicodeString by default
Olivier Sannier wrote on Tue, 15 May 2012: Is there a way to force the string type to be an alias to UnicodeString instead of AnsiString as it is by default? It is not possible in FPC 2.6.x. Wth the svn trunk version, you can use {$modeswitch unicodestrings} (in combination with {$h+}), or even better {$mode delphiunicode} (which also enable other modeswitches that have been implemented for Delphi2009+ compatibility). Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setting string to be UnicodeString by default
On Tue, 15 May 2012 10:43:19 +0200 Jonas Maebe jonas.ma...@elis.ugent.be wrote: Olivier Sannier wrote on Tue, 15 May 2012: Is there a way to force the string type to be an alias to UnicodeString instead of AnsiString as it is by default? It is not possible in FPC 2.6.x. Wth the svn trunk version, you can use {$modeswitch unicodestrings} (in combination with {$h+}), or even better {$mode delphiunicode} (which also enable other modeswitches that have been implemented for Delphi2009+ compatibility). Is this new mode only a temporary experiment or will it stay? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setting string to be UnicodeString by default
Mattias Gaertner wrote on Tue, 15 May 2012: On Tue, 15 May 2012 10:43:19 +0200 Jonas Maebe jonas.ma...@elis.ugent.be wrote: It is not possible in FPC 2.6.x. Wth the svn trunk version, you can use {$modeswitch unicodestrings} (in combination with {$h+}), or even better {$mode delphiunicode} (which also enable other modeswitches that have been implemented for Delphi2009+ compatibility). Is this new mode only a temporary experiment or will it stay? It will stay afaik, although the effects may still change to better match Delphi2009+ compatibility if required. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Linux sound (especially MIDI) programming: ALSA?
Mark Morgan Lloyd wrote: leledumbo wrote: http://sourceforge.net/projects/fpalsa/ http://sourceforge.net/projects/humus/ Thanks for those. Also http://perso.wanadoo.es/plcl/alsapas/alsapas-en.html so as I thought there appears to be (at least) two sets of ALSA bindings: fpalsa and alsapas. Noted HuMuS, but that appears to be for PortAudio. However using that as a seed I get to http://breakoutbox.de/pascal/pascal.html#PortAudio which claims to include PortMidi support- this is supposedly cross-platform but requires an additional library which might not be available on all distreaux. Also MIDI is very much the poor cousin and operating support is patchy, so since I've got ALSA working I'm reluctant to risk breaking anything. Since running on anything other than Linux is not a significant priority, I think I'll probably start off with by doing a comparison of fpalsa and alsapas, and writing code that will support either if possible. If I could also code to support PortMidi that would be a bonus, but by no means essential: I'm trying to knock together a MIDI transposer for my own use, and testbed some techniques for another project. To wrap this up, alsapas is a translation of the ALSA headers etc. as of v0.9.7, and fpalsa is similar but corresponds to the slightly later v1.0.24. They have a slightly different style in that alsapas uses variable parameters while fpalsa uses pointers to be a bit closer to the original (and possibly to allow null parameters); alsapas is attractive in that it's got useful examples. As far as MIDI is concerned, alsapas still works but there's a handful of parameters named out that are no longer compatible with FPC, I've followed the author's convention and renamed those to _out; basic operation appears OK on Debian Squeeze x86 with a 3.2 kernel. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setting string to be UnicodeString by default
On Tue, May 15, 2012 at 6:16 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: Mattias Gaertner wrote on Tue, 15 May 2012: On Tue, 15 May 2012 10:43:19 +0200 Jonas Maebe jonas.ma...@elis.ugent.be wrote: It is not possible in FPC 2.6.x. Wth the svn trunk version, you can use {$modeswitch unicodestrings} (in combination with {$h+}), or even better {$mode delphiunicode} (which also enable other modeswitches that have been implemented for Delphi2009+ compatibility). Is this new mode only a temporary experiment or will it stay? It will stay afaik, although the effects may still change to better match Delphi2009+ compatibility if required. I would like to understand why Delphi compatibility is so important to FPC and Lazarus. Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setting string to be UnicodeString by default
Marcos Douglas wrote: On Tue, May 15, 2012 at 6:16 AM, Jonas Maebejonas.ma...@elis.ugent.be wrote: Mattias Gaertner wrote on Tue, 15 May 2012: On Tue, 15 May 2012 10:43:19 +0200 Jonas Maebejonas.ma...@elis.ugent.be wrote: It is not possible in FPC 2.6.x. Wth the svn trunk version, you can use {$modeswitch unicodestrings} (in combination with {$h+}), or even better {$mode delphiunicode} (which also enable other modeswitches that have been implemented for Delphi2009+ compatibility). Is this new mode only a temporary experiment or will it stay? It will stay afaik, although the effects may still change to better match Delphi2009+ compatibility if required. I would like to understand why Delphi compatibility is so important to FPC and Lazarus. In my case, I'm generating a DLL on the fly with FPC, a Dll that interfaces with Delphi XE2 and that is based on code written by the software users. Those users don't care that UnicodeString should be used, they only know of string and don't want to change all their scripts because we moved to a unicode version of Delphi. Hence the need to follow what Delphi has done and change string to be unicodestring. I'm not saying it is a good or bad thing, I don't want to start a debate here, I just want to say that I'd prefer if I wouldn't have to reparse my users code to replace string with UnicodeString just before generating. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setting string to be UnicodeString by default
On Tue, May 15, 2012 15:10, Marcos Douglas wrote: On Tue, May 15, 2012 at 6:16 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: Mattias Gaertner wrote on Tue, 15 May 2012: On Tue, 15 May 2012 10:43:19 +0200 Jonas Maebe jonas.ma...@elis.ugent.be wrote: It is not possible in FPC 2.6.x. Wth the svn trunk version, you can use {$modeswitch unicodestrings} (in combination with {$h+}), or even better {$mode delphiunicode} (which also enable other modeswitches that have been implemented for Delphi2009+ compatibility). Is this new mode only a temporary experiment or will it stay? It will stay afaik, although the effects may still change to better match Delphi2009+ compatibility if required. I would like to understand why Delphi compatibility is so important to FPC and Lazarus. In that case I suggest asking on the fpc-other list. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setting string to be UnicodeString by default
Marcos Douglas wrote on Tue, 15 May 2012: I would like to understand why Delphi compatibility is so important to FPC and Lazarus. Please hold that discussion on the fpc-other mailing list instead. This list is for getting help with using and programming in current FPC versions, and discussions like the above tend to explode and drown out any threads about concrete questions. Thanks, Jonas FPC mailing lists admin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Setting string to be UnicodeString by default
On Tue, May 15, 2012 at 10:19 AM, Tomas Hajny xhaj...@hajny.biz wrote: In that case I suggest asking on the fpc-other list. * On Tue, May 15, 2012 at 10:21 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: Please hold that discussion on the fpc-other mailing list instead. This list is for getting help with using and programming in current FPC versions, and discussions like the above tend to explode and drown out any threads about concrete questions. * I'm sorry. Well, I not was real question... just a though. I think compatibility is very important and compatibility with other compiler is, at minimal, curious for me -- and I'm a Delphi programmer too. But if you (and everybody) do not think the same, ok let's forget my comment. ;-) Marcos Douglas PS: OBones, I saw your comments, thanks. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal