blob: b6eed4dad51b9bbe05f87206dfc55bd42857a015 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Program Example58;
{ This program demonstrates the AnsiStrLastChar function }
Uses sysutils;
Var P : Pchar;
L : Longint;
Begin
P:='This is an PChar string.';
Writeln ('Last character of P is : ',AnsiStrLastChar(P));
L:=Longint(AnsiStrLastChar(P))-Longint(P)+1;
Writeln ('Length of P (',P,') is : ',L);
End.
|