Luis Fernando Del Aguila Mejía schrieb:
>  p:=pointer(cad1);
>  p:=p-8;
> Write('memory address : ',longint(p),'='); //Must show Size, but shows reference count
>  Writeln(longint(p^));

I fail to see why you need to mess with the internals of ansistrings at all.
What is the reason to access size and reference count this way?
At least for the size there is Length(cad1) which would be much clearer.

Although pointer arithmetic is possible in Pascal it looks like C.
And you loose any help from the compiler to check types.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to