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

Text vectors not working correctly #9

Closed
Lartu opened this issue Mar 6, 2019 · 1 comment
Closed

Text vectors not working correctly #9

Lartu opened this issue Mar 6, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@Lartu
Copy link
Owner

Lartu commented Mar 6, 2019

Normally in LDPL, text variables are by default initialized to "", the empty string. I've just noticed this is not the case with vectors. If you declare a text vector and then access a non-initialized index, the value stored there will be 0. No "0", but 0. This has to do with how LDPL declares and stores variables. Long story short, when text variables are declared, they are assigned the value of "" by default. When vectors are initialized, no values are assigned, you can't assign a value to every possible subindex of the vector, so when you try to access an uninitialized index you get the default value for an uninitialized variable in LDPL, that is 0.

This will be fixed soon as it is not the intended behavior of this data structure.

@Lartu Lartu added the bug Something isn't working label Mar 6, 2019
@Lartu
Copy link
Owner Author

Lartu commented Mar 6, 2019

I think this has been fixed!

@Lartu Lartu closed this as completed Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant