Some symbols or expressions can't be added as custom variables

Issue #772 new
Derei created an issue

I tried to set some custom variables for my day-to-day use, but failed. Some with good explanation, others maybe should be allowed to be implemented.

-I tried to set "in" as shortcut for "inch". Obviously failed because "in" was already used -I tried to set "to" as alias for "in", but gives compile error (can't understand why" -I tried to set " as symbol for inch (so I would type 5" instead of 5inch), but the symbol couldn't be set as variable. Again, this makes sense in common programming, but for this software, if there is no other reason to avoid it, I believe the combination of <Number>+<"> should be allowed.

Overall, the flexibility of adding variables should be increased.

Comments (2)

  1. Pol Welter

    The issue is that in is not a variable. It is a keyword (actually, it's an operator, same as +), and hence cannot be assigned to anything.

    Also I am opposite to adding " as an alias for inch by default. People might expect it to mean (arc-)seconds. We have always been considering to have strings as a proper data type in SC, which we would naturally delimit with quotes. I'd recommend keeping " available for that purpose.

    Other than these two issues, what makes you think that the overall flexibility of variables needs improvement?

  2. Derei reporter

    As I said, trying to set an alias for "in" or for "->" doesn't work. I tried to set the expression "to" as alias, but results in "compile error". Also, using "in" as a reserved keyword in this software doesn't really seem justified. In a programming language it has its purpose, but here it would have more sense to be left flexible. Each user could do their customizations.

    Personally I find it extremely annoying to have to write long words to call units. If I want to type a lot, I can use Excel, that is really annoying application. With SpeedCrunch I would like to have exactly that: speed.

  3. Log in to comment