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
SDEverywhere supports arrays with an unlimited number of dimensions, except for a problem when generating Vensim names in the output text file header row. For instance, generating C code for the 4D constant array:
ndim4[DimA, DimB, DimC, DimD] = 4
throws this exception:
TypeError: Cannot read property 'replace' of undefined
at decanonicalize (file:///Users/toddfincannon/Projects/SDEverywhere/src/Helpers.js:52:17)
at Object.vensimName (file:///Users/toddfincannon/Projects/SDEverywhere/src/Model.js:662:32)
at headerTitle (file:///Users/toddfincannon/Projects/SDEverywhere/src/CodeGen.js:344:18)
The text was updated successfully, but these errors were encountered:
The vensimName function was limited to 2 subscripts. I used the new matchAll JS String function to extract subscript names with any number of dimensions. I added a 4D array variable to the arrays_cname and arrays_varname test models. I also brought arrays_varname up to date with the arrays_cname model.
SDEverywhere supports arrays with an unlimited number of dimensions, except for a problem when generating Vensim names in the output text file header row. For instance, generating C code for the 4D constant array:
throws this exception:
The text was updated successfully, but these errors were encountered: