Re: [Lazarus] Strings

2009-10-27 Thread Jürgen Hestermann
The language has evolved and short string is mostly a historical remain. Definitely not! ShortString and AnsiStrings (and all other variants of string types) are just different ways to work with strings. Using ShortStrings you can avoid a lot of problems which you can have with AnsiStrings if

Re: [Lazarus] Strings

2009-10-28 Thread Mattias Gaertner
On Wed, 28 Oct 2009 07:15:14 +0100 Jürgen Hestermann wrote: > > The language has evolved and short string is mostly a historical > > remain. > > Definitely not! ShortString and AnsiStrings (and all other variants > of string types) are just different ways to work with strings. Using > ShortStr

Re: [Lazarus] Strings

2009-11-17 Thread Marco van de Voort
On Wed, Oct 28, 2009 at 10:16:48AM +0100, Mattias Gaertner wrote: > > all. Mapping this to different types dependend on compiler switches > > or whatever is a can of worms. I would prefer that one of the clear > > genuine string types is used directly. Lots of code is dependend on > > the string ty

Re: [Lazarus] Strings

2009-11-17 Thread Michael Van Canneyt
On Tue, 17 Nov 2009, Marco van de Voort wrote: On Wed, Oct 28, 2009 at 10:16:48AM +0100, Mattias Gaertner wrote: all. Mapping this to different types dependend on compiler switches or whatever is a can of worms. I would prefer that one of the clear genuine string types is used directly. Lots

Re: [Lazarus] Strings

2009-11-17 Thread Jürgen Hestermann
And I think shortstring should generally be discouraged. The standard is always "255 is enough", but sooner or later somebody hits it: That's like saying that short integer types like byte or word should be discouraged and only Int64 should be used. Shortstrings are just a completely diffe

Re: [Lazarus] Strings

2009-11-18 Thread Hans-Peter Diettrich
Jürgen Hestermann schrieb: And I think shortstring should generally be discouraged. The standard is always "255 is enough", but sooner or later somebody hits it: That's like saying that short integer types like byte or word should be discouraged and only Int64 should be used. That's a diffe

Re: [Lazarus] Strings

2009-11-18 Thread Alexsander Rosa
I think he means things like EAN codes (GS1-128 may have up to 48 characters), MD5 sums (32 characters) or some small piece of base64-encoded data. If you're ABSOLUTELY sure you will store only printable ASCII data (from 0x20 to 0x7e) and do not need more than 250 characters, ShortString may be use

Re: [Lazarus] Strings

2009-11-18 Thread Marco van de Voort
On Wed, Nov 18, 2009 at 07:12:24AM +0100, J?rgen Hestermann wrote: > > And I think shortstring should generally be discouraged. The standard is > > always "255 is enough", but sooner or later somebody hits it: > > That's like saying that short integer types like byte or word should be > discourage

Re: [Lazarus] Strings

2010-09-09 Thread Marco van de Voort
On Wed, Nov 18, 2009 at 07:12:24AM +0100, J?rgen Hestermann wrote: > > And I think shortstring should generally be discouraged. The standard is > > always "255 is enough", but sooner or later somebody hits it: > > That's like saying that short integer types like byte or word should be > discourage

[Lazarus] Strings Property Editor dialog newline keystroke reminder

2012-07-08 Thread Howard Page-Clark
The object inspector's strings editor has its [OK] button set as the default so pressing [Enter] closes the dialog, which is logical. I usually forget this when trying to enter several lines of text, and so close the dialog when trying to enter a new line in the strings memo. Could the dialog's

Re: [Lazarus] Strings Property Editor dialog newline keystroke reminder

2012-07-08 Thread Bart
On 7/9/12, Howard Page-Clark wrote: > The object inspector's strings editor has its [OK] button set as the > default so pressing [Enter] closes the dialog, which is logical. > I usually forget this when trying to enter several lines of text, and so > close the dialog when trying to enter a new li

Re: [Lazarus] Strings Property Editor dialog newline keystroke reminder

2012-07-08 Thread Hans-Peter Diettrich
Howard Page-Clark schrieb: The object inspector's strings editor has its [OK] button set as the default so pressing [Enter] closes the dialog, which is logical. IMO it's not logical to close an dialog for entering *multiple* lines with Enter. At least D5 adds a new line on Enter. I usually