get_args_fixed_length(3m_cli2)

πŸ“¦ version 3.2.0, in ubuntu resolute, ubuntu stonking

πŸ’– get_args_fixed_length πŸ’–

okay bestie, welcome to the get_args_fixed_length(3m_cli2) page β€” yes that's the whole manual name, we're just vibing with it up here instead of a boring header line. this is a Fortran thing, it lives in M_CLI2, and it's here to hand you back a string from your command line. let's get into it 🫢


✨ NAME ✨

get_args_fixed_length(3f) β€” [ARGUMENTS:M_CLI2] return keyword values for fixed-length string when parsing command line (LICENSE:PD)


🌸 SYNOPSIS 🌸

  subroutine get_args_fixed_length(name,value)

      character(len=*),intent(in)  :: name
      character(len=:),allocatable :: value
      character(len=*),intent(in),optional :: delimiters

πŸ¦‹ DESCRIPTION πŸ¦‹

so get_args_fixed_length(3f) is the girl who returns the value of a string keyword when the string value is a fixed-length CHARACTER variable. that's the whole job. she ate, no crumbs πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • NAME β€” the name of the commandline argument you wanna get the value of, bestie
  • VALUE β€” the variable that holds the returned value. heads up: it must be a fixed-length CHARACTER variable. no exceptions, periodt
  • DELIMITERS β€” by default the delimiter for array values is comma, colon, and whitespace. you can pass in a string with an alternate list of delimiter characters if you want to switch it up ✨

🌈 EXAMPLE 🌈

sample program, and yes she's iconic:

  program demo_get_args_fixed_length
  use M_CLI2,  only : set_args, get_args_fixed_length
  implicit none

   ! Define args
  character(len=80)   :: title
   ! Parse command line
  call set_args(' --title "my title" ')
   ! Assign values to variables
  call get_args_fixed_length('title',title)
   ! Use values
  write(*,*)'title=',title

  end program demo_get_args_fixed_length

πŸ‘‘ AUTHOR πŸ‘‘

John S. Urban, 2019 β€” we stan a legend 🫢


πŸ’œ LICENSE πŸ’œ

Public Domain β€” literally free, go wild πŸŽ‰


okay that's the whole page bestie, you're officially informed πŸ’–

signing off from the get_args_fixed_length(3m_cli2) manual, version dated February 10, 2023 β€” mwah, slay, go write some Fortran βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from