-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
division problem in macro #1641
Comments
Confirmed, I think we need to enable compatible integer divisions in the macro compiler, at lest by default. VO always gives a floating point result, no matter of the setting for the application. |
Or make the compiler compatibility switch working for the macrocompiler , too
Von: Chris Pyrgas ***@***.***>
Gesendet: Montag, 25. November 2024 14:51
An: X-Sharp/XSharpPublic ***@***.***>
Cc: jbertram1957 ***@***.***>; Author ***@***.***>
Betreff: Re: [X-Sharp/XSharpPublic] division problem in macro (Issue #1641)
Confirmed, I think we need to enable compatible integer divisions in the macro compiler, at lest by default. VO always gives a floating point result, no matter of the setting for the application.
—
Reply to this email directly, view it on GitHub <#1641 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABENORZ5R3LVEKATYY3EJ3D2CMTMDAVCNFSM6AAAAABSN6FCQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJYGA3TMMRVGE> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ABENORZEILNKUA7SDSM6JU32CMTMDA5CNFSM6AAAAABSN6FCQOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUU4WPFW.gif> Message ID: ***@***.*** ***@***.***> >
|
JB,
Then the expression |
Hi Robert.
Thank you for your answer
Yes, I have found this for me, too.
However, from a compatibility pov this is a very basic thing, which breaks all clipper style code. I am using for non-it user-edited small calculations , and can not explain them ☹. However, I can parse the entry and replace
t.e. “/6” with “/6.0” , so this may work
Gruß
Jörg
Von: Robert van der Hulst ***@***.***>
Gesendet: Montag, 25. November 2024 17:14
An: X-Sharp/XSharpPublic ***@***.***>
Cc: jbertram1957 ***@***.***>; Author ***@***.***>
Betreff: Re: [X-Sharp/XSharpPublic] division problem in macro (Issue #1641)
JB,
To support this we need to persist the compiler option in the compiled app. We are doing that already at this moment for the compiler options /VO11 and /VO13. However, we are not doing that for /VO12 (Clipper compatible integer divisions).
Btw if you code does not use literals:
PRIVATE Var1, Var2
Var1 := 10
Var2 := 6
Then the expression
?&("Var1/Var2")
will be a division of 2 usual variables and that already automatically returns a floating point result.
This will also happen when one of the 2 values is a literal and the other is a usual.
—
Reply to this email directly, view it on GitHub <#1641 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABENORZRUVP34UFKOWGVSIL2CNEFJAVCNFSM6AAAAABSN6FCQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJYGQ2TEMRQGM> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ABENOR4DXP7JBFYV6Z2FCL32CNEFJA5CNFSM6AAAAABSN6FCQOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUU5NNOW.gif> Message ID: ***@***.*** ***@***.***> >
|
Similar problem exists also with the = operator, as discussed in the online meeting today:
I will review also other compiler options for similar problems |
if executed in a macro, this results in 1, not in 1,67
?&("10/6")
The text was updated successfully, but these errors were encountered: