Sorry copy and paste error. d = decode. Corrected below.  But I think I see what you mean.  Just assigning a type to decode doesn't initialize it. But the compiler is happy with it, i.e. it doesn't call as illegal the statement "decode.create".

On 1/1/23 5:21 PM, Hairy Pixels via fpc-pascal wrote:

On Jan 2, 2023, at 6:57 AM, ppadilcdx--- via fpc-pascal 
<fpc-pascal@lists.freepascal.org> wrote:

program ex;

uses fgl;

var decode: specialize TFPGMap<String,Integer>;

begin
    decode.create;
    decode.add('X', 1);

end.
This doesn’t make sense. It should be

d := specialize TFPGMap<String,Integer>.Create;

Right? What is “decode” and why aren’t you assigning it to anything?

Regards,
Ryan Joseph

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

Reply via email to