Create a template for easier program creation
This commit is contained in:
		
							parent
							
								
									a786488bca
								
							
						
					
					
						commit
						ea9ed0eead
					
				
							
								
								
									
										18
									
								
								2023/src/template.f90
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								2023/src/template.f90
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,18 @@ | ||||
| program day | ||||
|     implicit none | ||||
|     integer, parameter :: max_chars = 300 | ||||
|     character(200) :: fname | ||||
|     character(max_chars) :: fline | ||||
|     integer :: n_arguments | ||||
|     n_arguments = command_argument_count() | ||||
|     integer :: istat | ||||
| 
 | ||||
|     if (n_arguments .eq. 1) then | ||||
|         call get_command_argument(1, fname) | ||||
|         print *, "File: ", trim(fname) | ||||
|         print * | ||||
|     else | ||||
|         print *, "Wrong number of arguments: ", n_arguments | ||||
|         stop | ||||
|     end if | ||||
| end program day | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user