xsharp.eu • DTOR()
Page 1 of 1

DTOR()

Posted: Tue Feb 25, 2020 3:31 pm
by kevclark64
The DTOR() function does not appear to be working properly. For example, DTOR(180) should return 3.14, but it actually returns 1.57.

DTOR()

Posted: Tue Feb 25, 2020 4:08 pm
by FFF
Even in Core i see the 1.57.
Strange enough, in X#/VO Dialect it doesn't compile:error XS0118: 'dtor' is a namespace but is used like a variable
EDIT:
in Git there is:
FUNCTION DToR(nDegrees as USUAL) AS REAL8
RETURN (REAL8) nDegrees/ 360 * Math.PI
so, either (REAL8) nDegrees / 360 * Math.PI * 2
or
RETURN (REAL8) nDegrees / 180.0 * Math.PI

EDIT2: Similiar in RtoD()
FUNCTION RToD(nRadian as USUAL) AS REAL8
// RETURN ((REAL8) nRadian / Math.PI) * 360.0
better:
RETURN ((REAL8) nRadian*180.0/Math.PI)

EDIT3: Wanted to save some time for dev, creating an issue at git - but either i'm to stupid for them or their account creation tool is abysmal. So, sorry, no deal ;)
EDIT4: Succeded - they send a "verificate your email" - but don't tell you in advance. So, "in", and issue added.

DTOR()

Posted: Tue Feb 25, 2020 6:00 pm
by Chris
Guys,

Thanks for reporting this, problem is fixed now as you suggested! It's too late to include this in tonight's new quickfix build, but Kevin if you need a quick fix for this, I can send you a new dll afterwards.

DTOR()

Posted: Tue Feb 25, 2020 6:34 pm
by kevclark64
Chris, I don't need a quick fix; but thanks for addressing this.

Kevin

DTOR()

Posted: Tue Feb 25, 2020 6:43 pm
by FFF
Chris,
out of curiosity: What does the compile error mean?

DTOR()

Posted: Tue Feb 25, 2020 8:08 pm
by Chris
Hi Karl,
FFF wrote:Chris,
out of curiosity: What does the compile error mean?
No idea, I do not get this error at all! :)
If you'd like, please post a repro sample and I will have a look.

DTOR()

Posted: Tue Feb 25, 2020 10:08 pm
by FFF
See attached versions. dtor has error, dtor2 has not. Both x#-runtime apps from gallery. The first one has had some swaps between dialects, if that means something ;)

DTOR()

Posted: Wed Feb 26, 2020 8:08 am
by Chris
Hi Karl,

Ah, thanks, that's because the app name is the same with the function name, this is not allowed. I will log this as a problem, to improve the error message to make it clear what the problem is.