Page 1 of 1
!! IN VO (made me laugh)
Posted: Wed Aug 25, 2021 4:40 pm
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
!! IN VO (made me laugh)
Posted: Thu Aug 26, 2021 9:44 am
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