HI Leonid,
Now that you mention it, I remember we discussed this in our dev meeting. But I do not remember what we decided about it . Will let Robert remind us..
Transporting VO to XSharp
Transporting VO to XSharp
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Transporting VO to XSharp
Leonid,
For out parameters we definitely support the "discard" variable that is just an underscore.
I am not sure , but I think we support that for REF parameters as well.
Just give it a try.
Robert
For out parameters we definitely support the "discard" variable that is just an underscore.
I am not sure , but I think we support that for REF parameters as well.
Just give it a try.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Transporting VO to XSharp
Robert,
Could you give an example of the syntax of this in XSharp? I could not do it even for OUT. The compiler throws an error:
Best regards,
Leonid
Could you give an example of the syntax of this in XSharp? I could not do it even for OUT. The compiler throws an error:
I tried several options:XS0103 The name '_' does not exist in the current context
Code: Select all
MyFunc(1, 2, OUT _)
MyFunc(1, 2, OUT STRING _)
MyFunc(1, 2, _)
MyFunc(1, 2, @_)
Leonid
Best regards,
Leonid
Leonid
Transporting VO to XSharp
Leonid.
MyFunc (1, 2, OUT VAR _ )
MyFunc (1, 2, OUT _ AS STRING)
MyFunc (1, 2, OUT NULL)
// not sure about the following ones
LOCAL _ as STRING
MyFunc (1, 2, REF _ )
See https://github.com/X-Sharp/XSharpDev/bl ... rp.g4#L839 for the formal declaration of different syntaxes
Robert
Robert
MyFunc (1, 2, OUT VAR _ )
MyFunc (1, 2, OUT _ AS STRING)
MyFunc (1, 2, OUT NULL)
// not sure about the following ones
LOCAL _ as STRING
MyFunc (1, 2, REF _ )
See https://github.com/X-Sharp/XSharpDev/bl ... rp.g4#L839 for the formal declaration of different syntaxes
Robert
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Transporting VO to XSharp
Robert, thanks!
All examples with OUT work fine. REF, as you have shown, also works fine (without warning of an unused variable). If REF still worked with underscore in the same syntax as OUT (without a LOCAL declaration), it would be very fine
Best regards,
Leonid
All examples with OUT work fine. REF, as you have shown, also works fine (without warning of an unused variable). If REF still worked with underscore in the same syntax as OUT (without a LOCAL declaration), it would be very fine
Best regards,
Leonid
Best regards,
Leonid
Leonid
Transporting VO to XSharp
Leonid
Can you open an issue for this on GitHub so I won’t forget this?
Robert
Can you open an issue for this on GitHub so I won’t forget this?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Transporting VO to XSharp
Since Leonid does not have a Git account, I opened it myself: https://github.com/X-Sharp/XSharpPublic/issues/363
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Transporting VO to XSharp
Hi all!
Happy Easter (Orthodox)!
Some details were clarified, considering which, perhaps, there is no need to do underscore for "REF".
It turns out that in the VODBOrdSetFocus function, the "cOrder" parameter, which returns the previous value, is declared as "OUT".
But in the VS 2019 editor, it appears as "REF" (see screenshot in the attachment). This is what confused me. But since this is actually "OUT", where underscore works great, I don’t see the need to modify "REF". Better to improve integration with VS 2019
Best regards,
Leonid
Happy Easter (Orthodox)!
Some details were clarified, considering which, perhaps, there is no need to do underscore for "REF".
It turns out that in the VODBOrdSetFocus function, the "cOrder" parameter, which returns the previous value, is declared as "OUT".
Code: Select all
XSharp VoDbFunctions.prg
FUNCTION VoDbOrdSetFocus(cIndexFile AS STRING,uOrder AS USUAL,cOrder OUT STRING) AS LOGIC
RETURN VoDb.OrdSetFocus(cIndexFile, uOrder, OUT cOrder)
Best regards,
Leonid
- Attachments
-
- screen1.jpg (28.18 KiB) Viewed 433 times
Best regards,
Leonid
Leonid
Transporting VO to XSharp
Leonid,
Confirmed and fixed. I also noticed that the XML comments were not shown for methods/functions with REF or OUT parameters. This has been fixed too.
Robert
Confirmed and fixed. I also noticed that the XML comments were not shown for methods/functions with REF or OUT parameters. This has been fixed too.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu