-
Notifications
You must be signed in to change notification settings - Fork 0
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 int/float variable type specifying in same way as it is supported for strings. #218
Comments
Ok, this ticket seems to be almost duplicate of |
After some code developing later I have to say this is pain. |
This is a valid point. If variable declaration becomes scoped (i.e. available till next
|
Scope support would be helpful. There should be also way to create scope on demand, like: Routines with return could be problematic to handle, but it can be assumed they are not creating scope by itself. Then 'scope' block can be used inside if necessary. It would be nice to be able to define type and constant name for variable in single line: I have searched my code for actual places where I was forced to specify opcodes, and it turns out it usually is case that naming variables is inconvenient so it end looking like: |
Currently when working with string variables following syntax can be used:
1@s, 1@v for local variables
s$1, v$1 for global variables
I propose to make it possible to mark in same way intention to use variable as integer or float, so it would be possible:
4@i = i$40
f$1200 = 400@f
I know variable type can be defined using var-end block, but it only allows one type at the time peer variable, and this also can not be walked around with using constants names.
This feature would eliminate need to specify variable type globally, or painfully searching and using opcodes for every assignment and arithmetic operations.
Decompiled code would look cleaner too, without opcodes and "// (int)" comments in many cases.
The text was updated successfully, but these errors were encountered: