Teknomancer / sysprocalc

Command-line expression-evaluator and x86 register descriptions
Apache License 2.0
0 stars 1 forks source link

Add support for variables #4

Closed Teknomancer closed 3 years ago

Teknomancer commented 4 years ago

Variables are stored expressions that are lazily evaluated when the variable is used.

  1. Variables must not start with a number and can have alphanumeric characters and underscore. No other characters are allowed.
  2. Restrict length of variable names to 128.
  3. Ensure circular dependencies are not allowed in the variable expression. For example:
    _c = _c + 1

    should not be allowed, but an expression of a variable may reference other variables.

  4. Have in-built read-only variables to hold constants for e.g, PI, E, _4K, PAGE_SIZE etc.
  5. Variables should be case insensitive.
Teknomancer commented 3 years ago

I hardly ever use variables. Closing.