A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://reference.wolfram.com/language/NETLink/ref/net/Wolfram.NETLink.IMathLink.PutNext.html below:

IMathLink.PutNext Method

Identifies the type of data element that is to be sent next.

Parameters
type
The type of expression you will be sending.
Remarks

PutNext is rarely needed. The two most likely uses are to put expressions whose heads are not mere symbols (e.g., Derivative[2][f]), or to put data in so-called "textual" form. Calls to PutNext must be followed by PutSize and PutData, or by PutArgCount for the ExpressionType.Function type.

Here is how you could send Derivative[2][f]:

ml.PutNext(ExpressionType.Function);  // The func we are putting has head Derivative[2], arg f
ml.PutArgCount(1);                    // this 1 is for the 'f'
ml.PutNext(ExpressionType.Function);  // The func we are putting has head Derivative, arg 2
ml.PutArgCount(1);                    // this 1 is for the '2'
ml.PutSymbol("Derivative");
ml.Put(2);
ml.PutSymbol("f");

Here is an example of sending an integer in "textual" form. This would be useful if you happened to have the digits of the integer in the form of an array of bytes rather than an int type:

byte[] digits = {(byte)'1', (byte)'2', (byte)'3'};
ml.PutNext(ExpressionType.Integer);
ml.PutSize(digits.Length);
ml.PutData(digits);
Exceptions See Also

IMathLink Interface | Wolfram.NETLink Namespace | PutSize | PutData | PutArgCount


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4