Show solving arithmetic expression step by step

  • Comments posted to this topic are about the item Show solving arithmetic expression step by step

  • Impressive how you use dynamic sql exec() function to have tsql resolve expressions within parentheses. It looks like your work was mainly in finding the innermost parentheses and working around a few quirks. Great way to simplify a task.

    At first I was expecting a recursive descent parser but this is much simpler but a bit fragile with no error checking.

    I would have liked cleaner code and a few comments to make it easier for us to understand.

    Great job,

    thanks.

  • I am curious as to why T-SQL is being used for this kind of application. I have difficulty envisaging a child connecting to SSMS and interactively typing-in an expression in a query analyzer window (not the greatest editor in the world) and without making a mistake, since it is assumed that the expression is entered correctly.

    In my view an application with a graphic user interface is far more likely to motivate a child in experimenting maths rather than experimenting the tedious manual entry in SSMS.

    More to the point, is an expression parser a legitimate application of T-SQL ?

  • Thanks, I'll check it out 🙂

  • Good fun script. I see it as something you would present the results to a child, not have them run the sql code.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply