You need to wrap the @nref macro is parenthesis to avoid it consuming the = t:
(@nref $N A i) = t or @nref($N, A, i) = t Note that in your example $N and A should be swapped around. — Mike On Wednesday, 11 February 2015 11:24:31 UTC+2, Christoph Ortner wrote: > > I just discovered the Cartesian package; what a nice set of tools! I have > a question though and couldn't find the answer anywhere (apologies if I've > missed it): > > within an `@nloops` construct I can write, say > > t = @nref A $N i > > but I cannot write > > @nref A $N i = t > > > and instead have to write > > setindex!(A, t, (@ntuple $N j)...) > > Am I just using this incorrectly, or is this indeed a restriction? Either > way, it might be useful to add something to the documentation? > > Thanks, > Christoph > > >
