String of Arithmetic to Int/Float Answer

Miscellaneous Forums/General Discussion/String of Arithmetic to Int/Float Answer

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The way I once did it was to count the brackets () and start with the lowest pair ie where you have ( followed by ), then work up from there. When you encounter some other symbol you do math on the numbers to each side, etc.

Alternatively in BlitzMax you could use function pointers and call functions for each kind of operation/scenario.