summaryrefslogtreecommitdiff
path: root/fpcdocs/sysutex/ex46.pp
blob: 6b6241f5a0811e3c59689138785da5b0a0b60a4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Program Example46;

{ This program demonstrates the StrBufSize function }
{$H+}

Uses sysutils;

Const S  = 'Some nice string';

Var P : Pchar;

Begin
   P:=StrAlloc(Length(S)+1);
   StrPCopy(P,S);
   Write (P, ' has length ',length(S));
   Writeln (' and  buffer size ',StrBufSize(P));
   StrDispose(P);
End.