mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 13:39:39 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			326 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			326 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
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. |