[UP]


Manual Reference Pages  - lgets (3)

NAME

lget(3f) - [ARGUMENTS:M_kracken] given keyword fetch logical array from command argument (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Returns
Example
See Also
Author
License

SYNOPSIS

function lgets(keyword) result(lvals)

    character(len=*),intent(in)  :: keyword
    logical,allocatable          :: lvals(:)

DESCRIPTION

The lgets(3f) function returns a dynamically allocated array of logical values from a string that is the value for a command line option. It is part of the M_kracken(3fm) module.

Values that cannot be read as a logical value are returned as a ".FALSE.".

OPTIONS

keyword
  the dictionary keyword (in form VERB_KEYWORD) to retrieve. The VERB name comes from the first argument of the KRACKEN(3f) call. The KEYWORD is a keyword from the second argument to the KRACKEN(3f) call.

RETURNS

lvals logical array returned by function. The input value should be from the case-insensitive list of the words "true, false, t, f, yes, no, y, n, .false., .true., .f., .t".

EXAMPLE

Sample program:

   program demo_lgets
   use M_kracken, only: kracken, lgets
   implicit none
   logical,allocatable  :: vals(:)
     ! define command arguments and parse user command
     call kracken(’demo’,’-truths .F. .T. .F. .F. .T. .T.’ )
     ! get any values specified on command line for -truth
     vals=lgets(’demo_truths’)
     write(*,*)vals
   end program demo_lgets

Example program runs:

   $ demo_lgets

    F T F F T T

$ demo_lgets -truths false F .f. no true .true. t T Yes No

    F F F F T T T T T T F

SEE ALSO

M_kracken(3f),
  kracken(3f)
dget(3f), dgets(3f), iget(3f), igets(3f), lget(3f), lgets(3f), rget(3f), rgets(3f), sget(3f), sgets(3f), retrev(3f)

parse(3f), dissect(3f), store(3f), setprompts(3f), show(3f)

AUTHOR

John S. Urban

LICENSE

Public Domain


lgets (3) October 17, 2020
Generated by manServer 1.08 from bf25eba5-e186-44e6-8975-0a580b88a27e using man macros.