> On Jun 25, 2019, at 2:16 PM, Jonas Maebe <jo...@freepascal.org> 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 compiler have to allocate a new 
>> ansistring or can it do some smart optimization? 
> 
> It has to allocate a new ansistring.

Ouch. That means I need to make lots of overloads. This is a prime candidate 
for generics then but I’m still waiting for my 
“implicitfunctionspecializations” modeswitch patch to be accepted.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to