Re: [fpc-pascal] SetLength warnings - request

2019-01-10 Thread Jonas Maebe
On 10/01/19 20:23, Martok wrote: Something I just found out, while changing some old code: why does that not work? var u: UnicodeString = nil; // Incompatible types: got "Pointer" expected "UnicodeString" a: AnsiString = nil; // Illegal Expression c: TCharArray = '';

Re: [fpc-pascal] SetLength warnings - request

2019-01-10 Thread Martok
Am 29.12.2018 um 22:35 schrieb Jonas Maebe: > You don't need to typecast dynamic arrays to pointer to initialise them > with nil. Simply "arr:=nil;" works. Ideally, the compiler would remove > this extra initialisation if you add it before it got a different value, > but it does not yet do that.

Re: [fpc-pascal] Multi-scope helpers draft

2019-01-10 Thread Mattias Gaertner via fpc-pascal
On Sat, 24 Nov 2018 11:20:05 +0700 Ryan Joseph wrote: > I’d like to propose this mode switch ($modeswitch multiscopehelpers) > to allow multiple helpers per scope. Can you explain the order/precedence of multiple helpers? Btw, why is the modeswitch called multiscopehelpers instead of multihelpe