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

Negative numeric values #3

Open
benbusby opened this issue Dec 28, 2022 · 0 comments
Open

Negative numeric values #3

benbusby opened this issue Dec 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@benbusby
Copy link
Owner

benbusby commented Dec 28, 2022

Currently there isn't a way to define a negative value.

The easiest way to approach this would be to create new variable types that are "negative" versions of existing or future data types (int -> -int, float -> -float), but that would mean consuming slots of variable types, which is maxed out at 9 (unless we want to enforce 2-digit parsing for complex data types in the future). It would also mean some potentially weird handling of those variables. For example, we wouldn't want to write separate cases for how to handle += of a negative vs positive integer.

Another approach would be to add another public element to Y2KVar that would toggle negative/positive for that variable. I'm reluctant to do that though, since that value wouldn't really make sense for string types, so it would be a wasted cycle.

I'm open to suggestion on how to implement this.

@benbusby benbusby added the enhancement New feature or request label Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant