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

Minus symbol does not space properly with PadOperators = Yes #23

Open
4getit opened this issue Apr 5, 2016 · 3 comments
Open

Minus symbol does not space properly with PadOperators = Yes #23

4getit opened this issue Apr 5, 2016 · 3 comments

Comments

@4getit
Copy link

4getit commented Apr 5, 2016

Great job! I'm using this script all the time.
A feature request:

It would be great to have an option so it formats:

g.DrawLine(0, 0, Me.Width-7, Me.Height+ 7)
to
g.DrawLine(0, 0, Me.Width - 7, Me.Height + 7)

(And "AND" is properly converting to "And" but I think "OR" is forgotten.)

Thanks!

@jcowgar jcowgar changed the title Enhancement Minus symbol does not space properly with PadOperators = Yes Apr 5, 2016
@jcowgar
Copy link
Owner

jcowgar commented Apr 5, 2016

When PadOperators = Yes, the above code translates to:

g.DrawLine(0, 0, Me.Width-7, Me.Height + 7)

I am assuming the code is interpreting -7 as NEGATIVE 7, not Minus 7.

@4getit
Copy link
Author

4getit commented Apr 5, 2016

Ah, of course. I totally overlooked the need of leaving Negatives alone.
I was only thinking about Minus.

... g.Height- 2, g.Height -2)
becomes
... g.Height - 2, g.Height -2)

First part ok, second part left alone.
I now understand why. :)

@jcowgar
Copy link
Owner

jcowgar commented Apr 5, 2016

Well, FormatCode should be able to determine the difference. So, this is till a bug that needs to be fixed. Not sure how yet, but it should be fixed.

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

No branches or pull requests

2 participants