-
-
Notifications
You must be signed in to change notification settings - Fork 379
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
Configurable default numeric type #146
Configurable default numeric type #146
Conversation
I'd just add a few more tests, but otherwise it looks good to me :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I ask you two final changes. See my comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you!
Published in version 2.6.0 |
I think this PR closes #35 ? |
Hi Davide,
The Parser correctly consider numbers as integers or doubles if they have decimal places just like the C# compiler does.
In some cases it may be useful to be able to configure the default type of numbers if no particular suffix is specified: for example in financial calculations, where usually numbers are interpreted as decimal type.
Another user @MrGorki have write about this on this issue #35.
I have implemented DefaultNumberType settings for configure the default type of number (Int, Long, Float, Double, Decimal).
I have also update documentation about this new features to specify how to use.
I have not touch the default behavior of parser if the settings is not set or set to Default.
I hope this new feature can be useful to others who like me use this beautiful library in financial application.
Marco