Re: [fpc-pascal] FPC 3.2 error when cross compile from Linux x64 to NetBSD

2019-06-25 Thread Schindler Karl-Michael
> Date: Tue, 25 Jun 2019 00:12:06 +0300 > From: "Alexey Tor." mailto:aaa5...@ya.ru>> > To: FPC mail list > > Subject: [fpc-pascal] FPC 3.2 error when cross compile from Linux x64 to > NetBSD > Message-ID:

[fpc-pascal] Forum down ?

2019-06-25 Thread Dimitrios Chr. Ioannidis via fpc-pascal
Hi, I just tried to connect to https://forum.lazarus.freepascal.org/ and I got : "Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later. " Is it under maintenance ? regards, -- Dimitrios Chr. Ioannidis _

[fpc-pascal] String conversions

2019-06-25 Thread Ryan Joseph
I’m making some string helper functions and using ansistring as inputs (in case there are longer strings than 255 chars). What happens when you pass a short string as an ansistring? Does the compiler have to allocate a new ansistring or can it do some smart optimization? Regards, Ryan

Re: [fpc-pascal] String conversions

2019-06-25 Thread Jonas Maebe
On 25/06/2019 20:15, Ryan Joseph wrote: > I’m making some string helper functions and using ansistring as inputs (in > case there are longer strings than 255 chars). What happens when you pass a > short string as an ansistring? Does the compiler have to allocate a new > ansistring or can it do s

Re: [fpc-pascal] String conversions

2019-06-25 Thread Ryan Joseph
> On Jun 25, 2019, at 2:16 PM, Jonas Maebe wrote: > > On 25/06/2019 20:15, Ryan Joseph wrote: >> I’m making some string helper functions and using ansistring as inputs (in >> case there are longer strings than 255 chars). What happens when you pass a >> short string as an ansistring? Does the

Re: [fpc-pascal] String conversions

2019-06-25 Thread Ryan Joseph
> On Jun 25, 2019, at 2:16 PM, Jonas Maebe wrote: > > It has to allocate a new ansistring. Another question: if I do "s += c” will the string reallocate memory for 1 character or is there an exponential growing function? If it does grow by one character at a time how can I reserve a certain

Re: [fpc-pascal] String conversions

2019-06-25 Thread Jonas Maebe
On 25/06/2019 21:12, Ryan Joseph wrote: > > Another question: if I do "s += c” will the string reallocate memory for 1 > character or is there an exponential growing function? If it does grow by one > character at a time how can I reserve a certain capacity in advance? Strings always contain th

Re: [fpc-pascal] String conversions

2019-06-25 Thread Marco van de Voort
Op 2019-06-25 om 21:12 schreef Ryan Joseph: On Jun 25, 2019, at 2:16 PM, Jonas Maebe wrote: It has to allocate a new ansistring. Another question: if I do "s += c” will the string reallocate memory for 1 character or is there an exponential growing function? If it does grow by one characte

Re: [fpc-pascal] String conversions

2019-06-25 Thread Ryan Joseph
> On Jun 25, 2019, at 3:55 PM, Marco van de Voort > wrote: > > An exponential growing function applied to all strings would have many worse > case behaviours, where it would eat up heaps of memory for nothing. This is > why it is better to have the programmer indicate it is a growing string