mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 11:49:37 +01:00 
			
		
		
		
	codetools: examples: filename as param
git-svn-id: trunk@41691 -
This commit is contained in:
		
							parent
							
								
									9fab3a68db
								
							
						
					
					
						commit
						74535103a4
					
				@ -41,12 +41,16 @@ var
 | 
			
		||||
  FirstSortedIndex: integer;
 | 
			
		||||
  LastSortedIndex: integer;
 | 
			
		||||
begin
 | 
			
		||||
  if (ParamCount>=1) and (Paramcount<>1) then begin
 | 
			
		||||
  if (ParamCount>1) then begin
 | 
			
		||||
    writeln('Usage:');
 | 
			
		||||
    writeln('  ',ParamStr(0));
 | 
			
		||||
    writeln('  ',ParamStr(0),' <filename>');
 | 
			
		||||
  end;
 | 
			
		||||
  Filename:=ExpandFileName(SetDirSeparators('scanexamples/directives1.pas'));
 | 
			
		||||
  if Paramcount=1 then
 | 
			
		||||
    Filename:=ParamStrUTF8(1)
 | 
			
		||||
  else
 | 
			
		||||
    Filename:=SetDirSeparators('scanexamples/directives1.pas');
 | 
			
		||||
  Filename:=ExpandFileName(Filename);
 | 
			
		||||
 | 
			
		||||
  // load the file
 | 
			
		||||
  Code:=CodeToolBoss.LoadFile(Filename,true,false);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user