Page 10 - Demo
P. 10
Interface to Mathematica%uf09f%uf09fRCPConsult2020-2025Page 10DEFFUNC(1,MATHEMATICA,StrurelToMathematica)(p1,p2){MathematicaCommon Interface}=MathematicaInterfaceTo use this DEFFUNChaving two arguments (p1,p2) in symbolic expressions you have to call it by its keyword FUNCwith specific values for (p1,p2). The first argument p1 is a text string and the second argument p2 defines a switch which can have only two values: 0 or 1. For case0 the abovetext string is thename of an external script file without extension%u2019.mt%u2019written using rules as described in 6.For case 1it is a direct expression written in Mathematicalanguage, see 7.FLIM(21)=FUNC(1)(\andFLIM(22)=FUNC(1)(\Additionally, a special formfor case1can be used. If the firstcharacter in the string of a function argumentisthe symbol %u2019%%u2019, the entire expression will be interpreted as a sequence of statement(s)for the Mathematicaengine, separated by %u2019;%u2019.In this case no value is computed, and the return value is an empty state like %u00d8. This possibility allows to provide pre-settingsand/or engine specific pre-calculation around acall of a state function or similar function in STRUREL. For example,DEFFUNC(41)=FUNC(1)(\DEFFUNC(42)=FUNC(1)(\DEFFUNC(43)=FUNC(1)(\DEFFUNC(44)=FUNC(41)+FUNC(42)+FUNC(43)Evaluation of DEFFUNC(44)looks like:This feature requires sufficient experience in the handling ofthe interface enginetoMathematica. Please take a care when using it!