C# ExampleTable of ContentsBuild FAQ
Delphi for .NET Example

Using Math Parser for .NET in Delphi

Delphi 8 for .NET can use .NET Assemblies written in C#. Before you can use the Bestcode.MathParser assembly, you need to add a reference to it in your Delphi IDE.

Screen shot on the left shows the Add Reference menu item.

 

You will see the list of .NET assemblies. You can click “Browse” button to browse to the location where you put the component to add a reference to it:

Here is what the browse dialog looks like:

This will add the bcParser’s DLL location in the search directories list in your project settings:

Once you have a reference to the assembly, you can use the Bestcode.MathParser unit (namespace) in your uses clauses. Below is Delphi 8 Example source code for the math parser .NET version:

 

Here is the implementation section of the Delphi Form. Note the use of a user defined custom function for the parser. Also, creation and use of a custom variable is shown:

Once you compile this application, the screen shot looks like this:

Delphi is an excellent choice for .NET programming and you can use bcParser.NET for your application’s parsing needs. For earlier Delphi versions you may consider TbcParser (VCL Component), or bcParserX (COM Component) too.

Happy coding!

webmaster@bestcode.com