You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature
This would be extension of #346, #354 and #344. Arrays are treat as variables and therefore, can be freely used as one.
To Reproduce
We are not differentiating variables from array, so the code where we sum two variables, as example, can be in fact two arrays!
Sim-C:
var b[10]
b[0] = 1
// All line following should throw an error, but it does not!
c = b[b]
d = b * 2 + b
e[10]
e[b + b] = 10
f = e[b + b]
Expected behavior
We should add another metadata type for array and one filed more in the Symbol Table, then add a case on expression function in simc_parser.py to know if we are indexing the array 'b[x]' or using it raw without indexing!
Desktop (please complete the following information):
OS: Fedora 30.0.x
Additional context
Start this issue only if you look at CONTRIBUTING.md file
The text was updated successfully, but these errors were encountered:
Math-O5
changed the title
[BUG REPORT]
[BUG REPORT] Array and variable should not be treat as the same
Jan 8, 2021
Math-O5
changed the title
[BUG REPORT] Array and variable should not be treat as the same
[FEATURE REPORT] Improvement of arrays: Differentiate array from variables to avoid bugs and check out for ranges when indexing
Jan 8, 2021
Describe the feature
This would be extension of #346, #354 and #344. Arrays are treat as variables and therefore, can be freely used as one.
To Reproduce
We are not differentiating variables from array, so the code where we sum two variables, as example, can be in fact two arrays!
Sim-C:
Expected behavior
We should add another metadata type for array and one filed more in the Symbol Table, then add a case on expression function in simc_parser.py to know if we are indexing the array 'b[x]' or using it raw without indexing!
Desktop (please complete the following information):
Additional context
Start this issue only if you look at CONTRIBUTING.md file
The text was updated successfully, but these errors were encountered: