11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A.2 Internal Representations of Data Types • 361Return StatementRETURN∧ expr − seqMaple syntax: return "msg", arg, ... argLength: 2The Maple return statement. The expression sequence is evaluated,giving the value(s) to return.Rectangular TableRTABLE ∧ data ∧ maple− ∧ ind− ∧ attrib flags numtypefn elems...L 1 U 1 . . . . . . L N U N P 1 P 2Maple syntax: rtable(...)Length: 2n + p, 2n + p, or 2n + p, where n is the number of dimensions(0 to 63), and p is 0, 1, or 2, depending on the number of P iparameters.The data field points to either a block of memory (for dense and NAGsparseRTABLEs), or to a HASHTAB structure (for Maple-sparse RTABLEs).The data block is either an object of type BINARY, or memory allocateddirectly from the operating system’s storage manager when the blockwould be too large to be allocated as a Maple data structure. If the datablock is a BINARY object, the data pointer points to the first data word,not to the object header.The maple-type field points to a Maple structure specifying the datatype of the elements of an RTABLE of Maple objects. If the RTABLE containshardware objects, the maple-type field points to the Maple NAMEanything.The ind-fn pointer points to either an empty expression sequence(NULL), or an expression sequence containing at least one indexing functionand a pointer to a copy of the RTABLE structure. The copy of theRTABLE is identical to the original, except that its ind-fn field refers toone less indexing function (either NULL, or another expression sequencecontaining at least one indexing function and a pointer to another copyof the RTABLE with one less indexing function again).The attrib pointer points to an expression sequence of zero or morearbitrary attributes, which can be set by the setattribute function, andqueried by attributes.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!