Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3768

How to convert "if($var&1)" to Xojo?

$
0
0

Hello can anybody help me with this?

I have a php statement that I want convert to XOJO

// $score is a String typecasted to Int
// $before is an array of strings
 
if (isset($before[$i])) {
                $score	= (int)$before[$i];
                if ($score & 1) {	// only odd
                    //$part .= $score; // debugging
                    $parts[] = $part;	
                    $part = '';
                }
            }

It looks like Bitwise And, but Xojo returns UInt64 and not boolean. So I guess I can’t use it like here.
Does anybody have any ideas?
Thank you

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 3768

Trending Articles