[fpc-pascal] Is there a StringRefCount() equivalence?
bihar_anwar at rocketmail.com
Fri Apr 30 05:42:11 CEST 2010
Thanks Anton for your suggestion, I will apply it. I hope FPC developers will include StringRefCount() to the RTL.
By the way, how do I call internal compiler functions directly (maybe using a tricky way) such as system.fpc_ansistr_incr_ref() and system.fpc_ansistr_decr_ref?
I couldn't call those kind of functions from my program, I guest it is caused by compilerproc definition.
----- Original Message ----
From: Anton Tichawa <anton.tichawa at chello.at>
To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Sent: Fri, April 30, 2010 12:44:08 AM
Subject: Re: [fpc-pascal] Is there a StringRefCount() equivalence?
On Thu, 2010-04-29 at 10:30 -0700, Bihar Anwar wrote:
> Delphi has StringRefCount() function (I'm not aware since what version it was introduced). I just curious, is there a function equivalent to it in FPC? Currently, I just steal a portion of code from System unit:
> PAnsiRec = ^TAnsiRec;
> TAnsiRec = packed record
> Len : SizeInt;
> First : Char;
> FirstOff = SizeOf(TAnsiRec) - 1;
shouldn't that read e.g.
> FirstOff = SizeOf(TAnsiRec) - SizeOf(Char);
fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal