\r
if(value == null) return;\r
\r
- if(base.isStoredAsArray()) return;\r
+ if(base.isStoredAsArray(env)) return;\r
\r
int fullDimension = base.dimension();\r
if(fullDimension == 1) {\r
validateSize(env, subscripts, value);\r
\r
if(value instanceof Array) {\r
- if(base.isStoredAsArray()) {\r
+ if(base.isStoredAsArray(env)) {\r
env.put(base.index(env, subscripts), value);\r
} else {\r
assignArray(env, base.index(env, subscripts), (Array)value, 0);\r
}\r
} else {\r
- if(base.isStoredAsArray()) {\r
+ if(base.isStoredAsArray(env)) {\r
Object _existing = env.getValue(base.index);\r
Array existing = (Array)_existing;\r
if(existing == null) {\r
for(int d : dimensions) result *= d;\r
return result;\r
}\r
- public boolean isStoredAsArray() {\r
+ public boolean isStoredAsArray(IEnvironment env) {\r
if(dimensions == null) return false;\r
for(int d : dimensions) if(d == -1) return true;\r
- return false;\r
+ return (env instanceof Frame);\r
}\r
\r
VariableBase withBase(String prefix) {\r
\r
public int getConstantIndex(IEnvironment environment, IExpression[] subscripts) {\r
\r
- if(isStoredAsArray()) {\r
+ if(isStoredAsArray(environment)) {\r
return -1;\r
} else {\r
\r
}\r
}\r
\r
- if(isStoredAsArray()) {\r
+ if(isStoredAsArray(environment)) {\r
\r
Array array = (Array)environment.getValue(index);\r
if(hasScalarSubscript(subscripts)) {\r