[fpc-pascal]The compiler messes up some pointers.

Barry Kelly dynagen at eircom.net
Sun Sep 23 01:06:31 CEST 2001


On Sat, 22 Sep 2001 21:58:39 -0000, yendor at nic.fi wrote:


> By the way. My 
> Var
>   TempL : ^LongInt;
>   A : AnsiString;
>   B : AnsiString;
> Begin
>   A := 'Blaah3';
>   B := A;
>   TempL := Pointer(A);
>   Dec(TempL);
>   Writeln(TempL^);
> End.
>  - proggie returns -1. Is reference counting working?

Constant strings have a refcount of -1.

-- Barry

-- 
  If you're not part of the solution, you're part of the precipitate.
Team JEDI: http://www.delphi-jedi.org
NNQ - Quoting Style in Newsgroup Postings
  http://web.infoave.net/~dcalhoun/nnq/nquote.html




More information about the fpc-pascal mailing list