The tutorial consists of more than 200 live examples from 50 sections given separately for JAVA, C# and C++. Each of the examples can be copied and run on your own environment. In addition, mXparser provides an extensive collection of over 500 built-in math functions, expressions and symbols. Familiarize yourself with the scope and the syntax. Live testing is the best way to learn. Good luck! 🙂
Below is the code for JAVA, C# (the code for C# is almost identical) and C++. To copy the code, double-click inside the frame.
List of available options
Java/C# code
// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
// Only built-in elements
List<KeyWord> mXparser.getKeyWords();
List<KeyWord> mXparser.getKeyWords(String query);
C++ code
#include "org/mariuszgromada/math/mxparser.hpp"
// ...
// Only built-in elements
ListPtr<KeyWordPtr> mXparser::getKeyWords();
ListPtr<KeyWord>Ptr mXparser::getKeyWords(const std::string&);
Java/C# code
// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
// Also with user-defined elements,
// when e is an instance of Expression
List<KeyWord> e.getKeyWords();
List<KeyWord> e.getKeyWords(String query);
C++ code
#include "org/mariuszgromada/math/mxparser.hpp"
// ...
// Also with user-defined elements,
// when e is an instance of Expression
ListPtr<KeyWordPtr> e->getKeyWords();
ListPtr<KeyWord>Ptr e->getKeyWords(const std::string query);
For a basic in-line search, simply provide a word (e.g.: "sine") in the query parameter.
Advanced search is also possible, please use one of the tags below when formatting the query parameter:
[mXparser-v.5.2.0] Number of keywords = 6
[mXparser-v.5.2.0] --------------------
[mXparser-v.5.2.0] Keyword = @~
[mXparser-v.5.2.0] Description = Bitwise unary complement - Bitwise operator
[mXparser-v.5.2.0] Syntax = @~a
[mXparser-v.5.2.0] Since = 4.0
[mXparser-v.5.2.0] Type = Bitwise operator
[mXparser-v.5.2.0] Type id = 11
[mXparser-v.5.2.0] id = 1
[mXparser-v.5.2.0] --------------------
[mXparser-v.5.2.0] Keyword = @&
[mXparser-v.5.2.0] Description = Bitwise and AND - Bitwise operator
[mXparser-v.5.2.0] Syntax = a @& b
[mXparser-v.5.2.0] Since = 4.0
[mXparser-v.5.2.0] Type = Bitwise operator
[mXparser-v.5.2.0] Type id = 11
[mXparser-v.5.2.0] id = 2
[mXparser-v.5.2.0] --------------------
[mXparser-v.5.2.0] Keyword = @^
[mXparser-v.5.2.0] Description = Bitwise exclusive or XOR - Bitwise operator
[mXparser-v.5.2.0] Syntax = a @^ b
[mXparser-v.5.2.0] Since = 4.0
[mXparser-v.5.2.0] Type = Bitwise operator
[mXparser-v.5.2.0] Type id = 11
[mXparser-v.5.2.0] id = 3
[mXparser-v.5.2.0] --------------------
[mXparser-v.5.2.0] Keyword = @|
[mXparser-v.5.2.0] Description = Bitwise inclusive or OR - Bitwise operator
[mXparser-v.5.2.0] Syntax = a @| b
[mXparser-v.5.2.0] Since = 4.0
[mXparser-v.5.2.0] Type = Bitwise operator
[mXparser-v.5.2.0] Type id = 11
[mXparser-v.5.2.0] id = 4
[mXparser-v.5.2.0] --------------------
[mXparser-v.5.2.0] Keyword = @<<
[mXparser-v.5.2.0] Description = Signed left shift - Bitwise operator
[mXparser-v.5.2.0] Syntax = a @<< b
[mXparser-v.5.2.0] Since = 4.0
[mXparser-v.5.2.0] Type = Bitwise operator
[mXparser-v.5.2.0] Type id = 11
[mXparser-v.5.2.0] id = 5
[mXparser-v.5.2.0] --------------------
[mXparser-v.5.2.0] Keyword = @>>
[mXparser-v.5.2.0] Description = Signed right shift - Bitwise operator
[mXparser-v.5.2.0] Syntax = a @>> b
[mXparser-v.5.2.0] Since = 4.0
[mXparser-v.5.2.0] Type = Bitwise operator
[mXparser-v.5.2.0] Type id = 11
[mXparser-v.5.2.0] id = 6
You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.