Skip to content

Conversation

sadeem-albir
Copy link
Contributor

Increased the accuracy of the comment description, and removed the " != '\0' " part of the while test. Comparing two characters for equality doesn't require seeing if their comparison is not equal to null, it is the same as writing "while ((x == y) != 0)". If x and y are ints or any other datetype, the '==' check suffices when checking for a boolean value.

sadeem-albir and others added 2 commits March 22, 2024 08:04
Increased the accuracy of the comment description, and removed the " != '\0' " part of the while test. Comparing two characters for equality doesn't require seeing if their comparison is not equal to null, it is the same as writing "while ((x == y) != 0)". If x and y are ints or any other datetype, the '==' check suffices when checking for a boolean value.
Copy link
Owner

@ohkimur ohkimur left a comment

Choose a reason for hiding this comment

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

@sadeem-albir Great job!

@ohkimur ohkimur merged commit 7a45948 into ohkimur:main Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants