is there any way to forca a logical or and not a binary one?
if you'd try this:
blitz will evaluate the "x and y and z" part binary (001 & 010 & 100) so the outcome is 0. other languages have special characters for binary Ands and Ors such as & and | and evaluate nonzero numbers and nonempty strings as true.
and it becomes even worse when you want to combine locigal and binary Ands and Ors (here binary and x and y and check if the texture is set):
and if you change "texture" to "texture>0" it evaluates as 1 (funny sidethingy, try: "print True+1") so it still does not work. i think this is very confusing and i wouldn't mind (knowing about) a method to force binary or logical Ands and Ors...
if you'd try this:
x = 1 y = 2 z = 4 If x And y And z Print "this will not be printed" Else Print "this will" EndIf WaitKey
blitz will evaluate the "x and y and z" part binary (001 & 010 & 100) so the outcome is 0. other languages have special characters for binary Ands and Ors such as & and | and evaluate nonzero numbers and nonempty strings as true.
and it becomes even worse when you want to combine locigal and binary Ands and Ors (here binary and x and y and check if the texture is set):
x = 2 y = 3 texture = 164000320 ;a dummy texture pointer If x And y And texture Print "all true" Else Print "crap" EndIf WaitKey
and if you change "texture" to "texture>0" it evaluates as 1 (funny sidethingy, try: "print True+1") so it still does not work. i think this is very confusing and i wouldn't mind (knowing about) a method to force binary or logical Ands and Ors...