Xs$Return

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Xs$Return

Post by Karl-Heinz »

i just recompiled a small VOGUI-App that uses Vulcan dlls.

"warning XS0219: The variable 'Xs$Return' is assigned but its value is never used"

what does 'Xs$Return' mean ?

regards
Karl-Heinz
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Xs$Return

Post by wriedmann »

Hi Karl-Heinz,

this message with Beta 5 should be gone.

Xs$Return is a compiler generated variable in assign methods, and this warning show up if your assign method returns something.

Wolfgang

P.S. I had the same question, therefore I can answer this time
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Xs$Return

Post by Karl-Heinz »

Hi Wolfgang

yes, it´s an typical VO assign.

> this message with Beta 5 should be gone

do you mean both builds: fox and public ?

at least the 2.0.0.5 public build throws this warning.


regards
Karl-Heinz
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Xs$Return

Post by wriedmann »

Hi Karl-Heinz,

accordingly to my ticket it should be ok, but I have just checked and my FoX build shows it also.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Xs$Return

Post by robert »

Karl Heinz, Wolfgang,

Do you see the problem with the following code ?

Code: Select all

CLASS Foo 
	PROTECT _bar AS STRING
ACCESS Bar AS STRING      
	RETURN _bar
ASSIGN Bar(cBar AS STRING) AS STRING      
	RETURN _bar := cBar
END CLASS
I only see warning 9032 (This entity type cannot return a value. Return value ignored.). The error about Xs$return should no longer be visible.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Xs$Return

Post by wriedmann »

Hi Robert,

I see it wit the following code:

Code: Select all

assign ChangeHeaderDragDropCursor ( lSet as logic ) as logic pascal 

	_lChangeHeaderDragDropCursor := lSet
	
	return _lChangeHeaderDragDropCursor
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Xs$Return

Post by robert »

Ok,
Found and fixed.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Xs$Return

Post by wriedmann »

Thank you very much!

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply