Skip to content

Instantly share code, notes, and snippets.

@tailriver
Last active September 20, 2016 09:11
Show Gist options
  • Save tailriver/701b5f74391b2cc20268d33d655fcb1f to your computer and use it in GitHub Desktop.
Save tailriver/701b5f74391b2cc20268d33d655fcb1f to your computer and use it in GitHub Desktop.
program main
character(len=32) :: argv
integer(8) :: size_of_a, n
integer, allocatable :: a(:)
call get_command_argument(1, argv)
read (argv,*) size_of_a
allocate(a(size_of_a))
n = size(a)
print *, "Size of array (via n): ", n
print *, "Size of array (via size(a)): ", size(a)
print *, "Size of array (via size(a,kind=8)): ", size(a, kind=8)
end program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment