Skip to content

Pass arguments from command line #10

Open
@aslozada

Description

@aslozada

In this test, an only argument with blank spaces and a only line break is passed from command line.

Test with fpm run
test_with_fpm
test_with_fpm2

Test without fpm run
test_without_fpm

Source code:

program main
 
  character(len=:), allocatable :: buffer
  integer                       :: length
   
  call get_command_argument(1,length=length)
  allocate(character(len=length) :: buffer)
   
  call get_command_argument(1,buffer)
  
  write(*,'("The argument is: ",a)') buffer
end program main

Have I forgotten anything?


fpm commit: 8f27d57

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions