the class to hold key-index pairs, keys are strings, indices are unique ints
clean the object to avoid memory leak
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(unidic), | intent(inout) | :: | U |
the number of items in a unidic
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(in) | :: | U |
add a key to a unidic, return its index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(inout) | :: | U | |||
character(len=*), | intent(in) | :: | key | |||
integer, | intent(out) | :: | val |
delete a key in a unidic, return its index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(inout) | :: | U | |||
character(len=*), | intent(in) | :: | key |
find a key in a unidic, return its index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(in) | :: | U | |||
character(len=*), | intent(in) | :: | key |
show a unidic
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(inout) | :: | U |
rename a key in a unidic
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(inout) | :: | U | |||
character(len=*), | intent(in) | :: | key1 | |||
character(len=*), | intent(in) | :: | key2 |
clean a unidic
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(inout) | :: | U |
print a unidic to a file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(inout) | :: | U | |||
integer, | intent(in) | :: | f_unit |
read a unidic from a file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(inout) | :: | U | |||
integer, | intent(in) | :: | f_unit |
iterate a unidic. Use it in this way: do while(U%iterate(key,val))
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unidic), | intent(inout) | :: | U | |||
character(len=max_char_length), | intent(out) | :: | key | |||
integer, | intent(out) | :: | val |