Skip to content

Conversation

@degawa
Copy link
Contributor

@degawa degawa commented Oct 13, 2023

To add a procedure for getting all the keys in a hashmap, the subroutine get_all_keys is added to the hashmap types.

get_all_keys is implemented as a subroutine rather than a function to maintain consistency with the other procedures, especially get_other_data.

The tasks done are summarized as follows:

  • Added a deferred procedure to hashmap_type
  • Implemented the type-bound procedure for chaining_hashmap_type and open_hashmap_type.
  • Added some tests and an example.
  • Updated the specification document for hashmaps.

closes #732

Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @degawa for this PR. LGTM! I have only a few minor suggestions.

Procedures to report the content of a map:

* `map % get_all_keys( all_keys )` - Returns all the keys
presented in the map;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be "present" or "presented"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use "presented in" to mean "located in," "existing in," or "contained in" here.
I cannot answer whether "present" or "presented" is correct due to my poor English skills, so I need help to create a natural expression, especially a phrase referring to "keys in a hash map."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milancurcic Any idea how it should be written?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jvdp1
The following expression is used in the documentation of Map in Java:

keySet()
Returns a Set view of the keys contained in this map.

So, I would like to change "presented" to "contained" to follow this expression. I would appreciate your comments.
Thank you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@degawa "contained" sounds good to me. Please, go ahead!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @jvdp1, for giving me a supportive push forward.
I fixed the documentation for the get_all_keys and pushed it.
I would appreciate a review.

Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for this PR @degawa !

@jvdp1 jvdp1 merged commit b8fbb3c into fortran-lang:master Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants