Hello, I try to create an app where I can calculate mathematical formula for business calculations.
To do that I use a dictionary with variables, value and formula.
example:
So, I could put all my formula on app inventor with blocks but I would like to add formula thanks to my phone, on the app.
So I made a screen "add formula"
The Math Block operations follow the 'rules of precedence' This means, if you are careful the Math Blocks can be used for almost any mathematical operation as Chris suggests.
At the present, you can not use App Inventor Blocks to 'build' Math equations from Blocks using a script. MIT has not yet implemented TAIL (text App Inventor Language). Developers cannot create math Blocks on the fly.
You can use the Math mXparser library by Mariusz Gromada using the extension Patryk pointed you to.
In it's simplest form, it works like this:
executing the equation a*(b+c) . You might use the extension to implement something similar to what you want.
This dictionary and dictionary text replacement technique might work for you for variable lookup in the formulae before feeding them to JavaScript for eval().