Hi,
hammering the release candidate on some special system cases some more:
Consider this first example:
<hansl>
open denmark
bundle b
list endo = diff(deflist(LRM, IBO))
list rhs1 = deflist(const, LRY)
list rhs2 = deflist(const, IBO(-1))
lists rhses = defarray(rhs1, rhs2)
list b.endo = endo
lists b.rhses = rhses
system
equations endo rhses # works
end system
system
equations b.endo b.rhses # "b.endo not found"
end system
</hansl>
I'm not sure if list(s) inside bundles are supposed to work in this
context or not.
(And BTW while we're at it, "equations" isn't recognized and
syntax-colored.)
--
Secondly, here's something with string substitution and a newline character:
<hansl>
open denmark
system
equation LRM 0 LRM(-1)
equation IBO 0 LRM IBO(-1)
end system
# standard way:
restrict $system
b[1,2] = 0
b[2,1] = 0
end restrict
estimate $system method=ols
# now with string substitution:
string rs = sprintf("b[1,2] = 0 \n b[2,1] = 0")
print rs # looks good, with line break
restrict $system
@rs # error: undefined symbol b
end restrict
</hansl>
Note that this whole thing with string substitution works fine when
there's only a single restriction, no \n character in the string!
This example probably looks a bit artificial, but the use case is to
process stuff like that programmatically inside a function.
thanks
sven