Re: [fpc-pascal] Question on TFPGMap

2023-01-01 Thread Sven Barth via fpc-pascal
ppadilcdx--- via fpc-pascal schrieb am Mo., 2. Jan. 2023, 02:29: > 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 statem

Re: [fpc-pascal] Question on TFPGMap

2023-01-01 Thread Hairy Pixels via fpc-pascal
> On Jan 2, 2023, at 8:29 AM, ppadilcdx--- via fpc-pascal > wrote: > > 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

Re: [fpc-pascal] Question on TFPGMap

2023-01-01 Thread ppadilcdx--- via fpc-pascal
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 wr

Re: [fpc-pascal] Question on TFPGMap

2023-01-01 Thread Hairy Pixels via fpc-pascal
> On Jan 2, 2023, at 6:57 AM, ppadilcdx--- via fpc-pascal > wrote: > > program ex; > > uses fgl; > > var d: specialize TFPGMap; > > begin >decode.create; >decode.add('X', 1); > > end. This doesn’t make sense. It should be d := specialize TFPGMap.Create; Right? What is “decode”

[fpc-pascal] Question on TFPGMap

2023-01-01 Thread ppadilcdx--- via fpc-pascal
I have a simple example that gives an access violation on the latest macos (fpc mode, i.e. no mode switch). What am I missing? Thanks in advance: program ex; uses fgl; var d: specialize TFPGMap; begin    decode.create;    decode.add('X', 1); end. An unhandled exception occurred at $000