Could someone find a place for this and put it into the manual and
online info? Thanks. RJF
..................
Maxima includes a technique to establish records or structures with
named fields.
It uses the following functions: defstruct, and new. It uses the
operator @ .
Here's an example.
defstruct(f(x,y,z)); /* declare f to be a record with 3 fields, x,y,z */
myrecord: new(f); /* myrecord is an instance of f */
myrecord at y:45; /* change myrecord as seen below. */
myrecord; ==> f(x,45,z)
accessing is done this way...
myrecord at y ==> 45.
Initializers also possible
defstruct(f(x,y=3.14159, z));
ff:new(f) ==> f(x,3.14159,z)
ff at y:2.71828 ==> ff is f(x,2.71828,z).
It would generally be better not to use x,y,z as field names
because assigning values, say x:10 to them will break stuff like ff at x,
which will be ff at 10, which is not meaningful.
added by Richard Fateman, 8/2005