get_args_fixed_length(3m_cli2)
π 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, bestieVALUEβ the variable that holds the returned value. heads up: it must be a fixed-lengthCHARACTERvariable. no exceptions, periodtDELIMITERSβ 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
- ubuntu resolute: libfortran-cli2-dev 3.2.0-6 Β· UNLICENSE
- ubuntu stonking: libfortran-cli2-dev 3.2.0-13 Β· UNLICENSE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms