mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 08:31:49 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			375 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			375 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program Example70;
 | |
| 
 | |
| { Program to demonstrate the StringToPPchar function. }
 | |
| 
 | |
| Uses linux;
 | |
| 
 | |
| Var S : String;
 | |
|     P : PPChar;
 | |
|     I : longint;
 | |
|     
 | |
| begin
 | |
|   // remark whitespace at end.
 | |
|   S:='This is a string with words. ';
 | |
|   P:=StringToPPChar(S);
 | |
|   I:=0;
 | |
|   While P[i]<>Nil do
 | |
|     begin
 | |
|     Writeln('Word ',i,' : ',P[i]);
 | |
|     Inc(I);
 | |
|     end;
 | |
|   FreeMem(P,i*SizeOf(Pchar));  
 | |
| end.
 | 
