Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow more common physics/engineering characters #285

Open
MisterE123 opened this issue Oct 8, 2024 · 4 comments
Open

Allow more common physics/engineering characters #285

MisterE123 opened this issue Oct 8, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@MisterE123
Copy link

MisterE123 commented Oct 8, 2024

I've been unable to use characters such as ṁ for mass flow rate, or vdot for volumetric flow rate, or DeltaV for change in velocity, or t_1/2 for the halflife. It would be nice to be able to use these characters as variables.

@MisterE123
Copy link
Author

image

In this table, alot of room would have been saved by using ΔT for
image

and ΔVol for
image

and
image
for
image

but as you can see it gives a syntax error.

@mgreminger
Copy link
Owner

Thanks for the suggestion. This is related to #283. Variable names need to be able to map one-to-one to Python variable names and Python doesn't support the dotted letter names. However, Python does support international unicode alphabets, so that would address the missing delta symbol since it's part of the Greek alphabet. I eventually plan to support the same international characters that Python supports in variable names.

@mgreminger mgreminger added the enhancement New feature or request label Oct 8, 2024
@MisterE123
Copy link
Author

MisterE123 commented Oct 8, 2024

could there be a single special character sequence, legal in python, which is invalid input syntax for EPxyz, which denotes a "spelled-out" special character?

Then, if we say the special character sequence is 00___xx___00_ then M-dot will be displayed properly in EPxyz, and in python map to the var 00___xx___00_m_dot. The sequence would have to be long enough to never be desired for a variable name by itself, but short enough to produce readable python code

@mgreminger
Copy link
Owner

It's technically possible to do, it just introduces quite a bit of complexity and overhead for the conversion to and from Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants