xsharp.eu • Documentation issues - Page 2
Page 2 of 2

Re: Documentation issues

Posted: Wed Mar 18, 2026 3:52 pm
by Chris
Hi Kees,

That's not a "regular" delegate (which is a definition of a method's parameters and argument types), but an "anonymous" delegate, or anonymous method using the delegate syntax.

I suspect this was a language feature that was introduced earlier in c#, but later a better/cleaner feature was introduced, the one you used with the => operator, which is an anonymous method/lambda expression (creating a piece of code that can be called, without explicitly putting it in a method with a name).

So I think there's no point anymore using the delegate syntax, you can use the anonymous method syntax instead, which does the same thing and is easier to read. You can read some more about this here https://learn.microsoft.com/en-us/dotne ... e-operator

Re: Documentation issues

Posted: Wed Mar 18, 2026 3:59 pm
by wriedmann
Hi Chris,
I will adjust my wiki accordingly.... Will have to spend some time on it to refresh some code and add new things.
Wolfgang

Re: Documentation issues

Posted: Mon Mar 23, 2026 10:55 am
by Kees Bouw
Just for the record: In the X# Help document (menu Help -> XSharp Documentation) there is a topic called "StrToFloat Function". But most of the text and the examples mention only the Val() Function. The tooltip of the StrToFloat() function is also about Val(). On the documentation website at https://www.xsharp.eu/help/index.html the StrToFloat() function can't be found.

Re: Documentation issues

Posted: Mon Mar 23, 2026 11:50 am
by Chris
Hi Kees,

Not sure why this function even exists, it's an undocumented function in VO, has different parameters than the X# implementation and it is never used at all in the SDK or anywhere else in the runtime.

All it does is to call Val(), so no point using it at all. Not sure if we should add a documentation page for it or simply remove it...

Re: Documentation issues

Posted: Mon Mar 23, 2026 1:58 pm
by Kees Bouw
Hi Chris,

It was my understanding that USUAL's are not "best practise" and that you should avoid using them as much as possible. So I thought it would be useful since StrToFloat() returns a FLOAT instead of USUAL.

Kees.

Re: Documentation issues

Posted: Mon Mar 23, 2026 3:44 pm
by Chris
Hi Kees,

That's true, but in this case it's just cheating :)



StrToFloat() might return a FLOAT, but it is actually calling Val() which returns a usual already and then this is converted to a float. So in this particular case, by using StrToFloat() you are only adding an extra implicit conversion and gain nothing at all.

Re: Documentation issues

Posted: Mon Mar 23, 2026 7:23 pm
by robert
Guys,
This is indeed an internal function. I will remove the docs from the help file for the next build

Robert