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

ambiguity between binary and integer for flagtable's value datafile loading #49

Open
vsouvan opened this issue Apr 19, 2020 · 2 comments

Comments

@vsouvan
Copy link
Collaborator

vsouvan commented Apr 19, 2020

When loading a datafile, the string representing a value for a flagtable can either be in binary form or integer.
There is a problem if the integer form is used, and the integer value only have 1 and 0 in it.
Which will be considered as a binary and read as a binary which is wrong.
Example: 1101 is loaded as 13 instead.

The workaround is avoid using integer as value for FLAGTABLE in datafile. And only use values in binary form.


Imported from Launchpad using lp2gh.

@vsouvan
Copy link
Collaborator Author

vsouvan commented Apr 19, 2020

(by chris-beauregard)
Could also default to binary, but allow a syntax like:

i1101
b01001
o544
x7f

which unambiguously specifies the flag type. The hex representation, in particular, might be useful.

@vsouvan
Copy link
Collaborator Author

vsouvan commented Apr 19, 2020

(by yves-pelletier)
I like Chris' suggestion.

@vsouvan vsouvan added this to the 0.8.6 milestone Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant