Re: [fpc-pascal] re-newing a pointer

2010-04-28 Thread Jonas Maebe
On 28 Apr 2010, at 13:11, spir ☣ wrote: It seems that once a pointer has been assigned nil, it needs to be (re)allocated using new() before using it to (re)set its target: You might want to read some tutorials on pointers before continuing you experiments. See e.g.: * http://lazarus-ccr.s

[fpc-pascal] re-newing a pointer

2010-04-28 Thread spir ☣
Hello, It seems that once a pointer has been assigned nil, it needs to be (re)allocated using new() before using it to (re)set its target: ... p := nil; // pointer to Integer ... new(p) ; p^ := 1; Is this hypothesis correct? Use case: Linked List nil is used in the "toNext" field of a li