!! IN VO (made me laugh)

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
IanB
Posts: 9
Joined: Tue Nov 01, 2016 8:12 pm
Location: UK

!! IN VO (made me laugh)

Post by IanB »

After years of using VO found this strange thing when I put two ! (by mistake) rather than just the one (i guess you could call it obvious)

Silly example below, but with me getting older sometimes difficult to see multiple !

iif(! TRUE,TRUE,FALSE) = FALSE
iif(!! TRUE,TRUE,FALSE) = TRUE
iif(!!! TRUE,TRUE,FALSE) = FALSE
iif(!!!! TRUE,TRUE,FALSE) = TRUE

Ian
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am

!! IN VO (made me laugh)

Post by Karl-Heinz »

Hi Ian,

No one stops you doing this, because there´s nothing wrong with the multiple '!' . Iin X# the compiler translates this code:

Code: Select all

? iif(! TRUE,TRUE,FALSE) == FALSE
? iif(!! TRUE,TRUE,FALSE) == TRUE
? iif(!!! TRUE,TRUE,FALSE) == FALSE
? iif(!!!! TRUE,TRUE,FALSE) == TRUE
?
? iif(.not. TRUE,TRUE,FALSE) == FALSE
? iif(.not. .not. TRUE,TRUE,FALSE) == TRUE
? iif(.not. .not. .not. TRUE,TRUE,FALSE) == FALSE
? iif(.not. .not. .not. .not. TRUE,TRUE,FALSE) == TRUE
?
to:

Code: Select all

XSharp.RT.Functions.QOut(true)
XSharp.RT.Functions.QOut(true)
XSharp.RT.Functions.QOut(true)
XSharp.RT.Functions.QOut(true)
XSharp.RT.Functions.QOut()
XSharp.RT.Functions.QOut(true)
XSharp.RT.Functions.QOut(true)
XSharp.RT.Functions.QOut(true)
XSharp.RT.Functions.QOut(true)
XSharp.RT.Functions.QOut()
regards
Karl-Heinz
Post Reply