Download MathCode C++ Release Notes
Transcript
ReleaseNotes1.3.nb 12 This makes it possible to translate as a loop that assigns each element of the variable. For the case above the corresponding Mathematica code is setshape@var, 3D; Do@ var@@iDD = i, 8i, 1, 3< D The function setshape is an internal MathCode function that sets the size or dimensions of the data structure corresponding to var before the loop is executed. Remark Using iterators that is not iterated at all will in Mathematica produce empty lists at some specific level. If the resulting table has 2 or more levels and one or more of its dimensions are zero, this will not be treated properly by MathLink. By externally executing the following: Table@i, 83<, 8i, 1, 3, -1<D will return $Aborted by MathLink. See section "Zero Dimensions and MathLink". MatrixExport Code with embedded type specifications as e.g foo[Real@ x_]->Real needs to load "System/MathCodeLanguage" to work as expected, since the type syntax is not a valid syntax for Mathematica alone. An alternative is to use Declare as Declare[foo[Real x_]->Real] to provide MathCode with the necessary type information. The advantage with this methods is that the code will also work in Mathematica without any preloaded packages. The Declare statement will evaluated to Null and ignored. To distribute files written with MathCode embedded type syntax, please contact MathCore AB to download a free version of the package "MathCodeLanguage`".