fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: '__Usual.operator &(__Usual, __Usual)' .. short circuit operator, ...

'__Usual.operator &(__Usual, __Usual)' .. short circuit operator, ... 2 years 4 months ago #1

  • ArneOrtlinghaus
  • ArneOrtlinghaus's Avatar Topic Author
  • Offline
  • Posts: 124
  • Karma: 1
The following expression is accepted:
(RueckString usual)
if ( islogic(RueckString) .and. Rueckstring == true)

The following expression gives the error below
if ( islogic(RueckString) .and. Rueckstring)

Error In order for '__Usual.operator &(__Usual, __Usual)' to be applicable as a short circuit operator, its declaring type '__Usual' must define operator true and operator false

Unfortunately there are many places in our old VO code. Is it necessary to change all places?

Thank you
Arne Ortlinghaus

Please Log in or Create an account to join the conversation.

'__Usual.operator &(__Usual, __Usual)' .. short circuit operator, ... 2 years 4 months ago #2

Arne,

This problem is fixed in our current development branch.
If you add a cast to your code then it works in Vulcan as well:
if ( islogic(RueckString) .and. (Logic) Rueckstring)

Unfortunately that cast will not work in VO.

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

'__Usual.operator &(__Usual, __Usual)' .. short circuit operator, ... 2 years 4 months ago #3

  • ArneOrtlinghaus
  • ArneOrtlinghaus's Avatar Topic Author
  • Offline
  • Posts: 124
  • Karma: 1
Thank you
Arne

Please Log in or Create an account to join the conversation.

  • Page:
  • 1