Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve D (decimal) atom #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Improve D (decimal) atom #59

wants to merge 1 commit into from

Conversation

Reconcyl
Copy link

Make D (to decimal) take the ord first if given a character.

Make `D` (to decimal) take the `ord` first if given a character.
@GolfingSuccess
Copy link
Contributor

@ScratchMan544 Why should it take the ordinal of a character and not just the digit the character itself represents ([0-9]) or 0 if the character is not a digit? That's how bit-wise functions (&, |, ^, ~) behave.

@Reconcyl
Copy link
Author

Taking the digit the character represents is not a particularly useful operation in this cae – after all, we're converting to decimal, so that would essentially just be an "eval". The reason I chose the ordinal is because that's what I actually found useful when golfing.

@DennisMitchell DennisMitchell force-pushed the master branch 5 times, most recently from 656a566 to 4765fa6 Compare April 9, 2018 21:23
@DennisMitchell DennisMitchell force-pushed the master branch 2 times, most recently from 244b435 to bee6aa3 Compare April 23, 2018 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants