rlwhitcomb / utilities

Some of my personal utility programs
MIT License
2 stars 0 forks source link

Add the "text" function to Calc to return whatever the text of the expression is #623

Open rlwhitcomb opened 10 months ago

rlwhitcomb commented 10 months ago

I want this so I can return the name of enums (for instance), and as kind of the obverse of "eval(...)"

This is tricky: for simple variables, just the name of the variable should be returned, for functions, the text of the function body should be, for other (random) expressions, just the expression text should be the result.

I would say this is surprising hard to define exactly what it should do .... especially in the case of function parameters.