On Tue, 12 May 2015, Sven Schreiber wrote:
 Sorry for the flood of postings, it's one of those days again...
 <hansl>
 open denmark
 bundle b
 b.p = 2
 b.r = 1
 var 2 IBO IDE	# works (of course)
 p = b.p
 var p IBO IDE # works
 var b.p IBO IDE	# doesn't work
 </hansl>
 Obviously the parser has problems digesting direct bundle member 
 invokations... 
It's necessary to distinguish the two parsers in gretl: the one for 
commands, and the one for assigment + functions calls.
In regard to the latter (that is, in constructing function arguments 
or the right-hand side of an assignment statement) you're supposed 
to be able to use any valid expression, with arbitrary nesting. 
E.g.,
<hansl status="valid">
bundle b
b.x = 0.1
scalar y = 16*exp(sqrt(b.x*3^5-8))
</hansl>
And if that fails, it's a bug, no question about it.
In regard to commands, the acceptable input is much more limited. 
Many commands (including "var") specify that parameters such as 
order "may be given numerically, or as the name of a pre-existing 
scalar variable". So, for example, like your example above, the 
following will fail
<hansl status="invalid">
scalar p = 6
var p/3 IBO IDE
</hansl>
Now admittedly one could argue that giving the name of a bundle plus 
a key that identifies a scalar member ought to count as giving "the 
name of a pre-existing scalar variable", but it's not literally true 
and it would take a good deal of work to make it so; and one could 
apply the same argument to a single matrix element, even if 
identified in some round-about way... leading in the limit to any 
expression that identifies a scalar.
In gretl, "commands" are nice and simple, and you pay a price for 
that.
Allin