C Library Functions  - clr (3)

NAME

clr(3f) - [M_list::dictionary::OOPS] clear basic dictionary (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
Author
License

SYNOPSIS

type(dictionary) :: dict

   call dict%clr()

DESCRIPTION

clear a basic dictionary.

OPTIONS

DICT the dictionary.

EXAMPLES

create and clear a basic dictionary

    program demo_clr
    use M_list, only : dictionary
    implicit none
    type(dictionary) :: caps
    integer                       :: i
       ! create a character string dictionary
       call caps%set(’A’,’aye’)
       call caps%set(’B’,’bee’)
       call caps%set(’C’,’see’)
       call caps%set(’D’,’dee’)
       ! show current dictionary
       write(*,’("DICTIONARY BEFORE CLEARED")’)
       write(*,101)(trim(caps%key(i)),trim(caps%value(i)),i=1,size(caps%key))
       call  caps%clr()
       write(*,’("DICTIONARY AFTER CLEARED")’)
       ! show current dictionary
       write(*,101)(trim(caps%key(i)),trim(caps%value(i)),i=1,size(caps%key))

101 format (1x,*(a,"=’",a,"’",:,",")) end program demo_clr

Results

      > DICTIONARY BEFORE CLEARED
      >  D=’dee’,C=’see’,B=’bee’,A=’aye’
      > DICTIONARY AFTER CLEARED

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 clr (3) July 22, 2023
Generated by manServer 1.08 from 0c98de12-d2d9-4e8a-99a2-e73fdb0377b2 using man macros.