Skip to content

Author: Norman Palardy

Binary Magic with Signed Integers

In binary the high bit (the one immediately following the &b in Xojo code) is the “sign bit”. When it’s set to 1, the value is interpreted as “negative” and when it’s set to 0, the value is “positive”. Meaning that bit is not used as part of the “number” itself.

Comments closed

#If vs. If and Conditional Compilation

There was a curious question on the forums about what # meant.

And from the way it was asked I could see the asker was thinking “I know what If means but what about that # in front of it?” And that if they knew what the # meant that the entire thing would make more sense.

And that’s a fair thought – except for one problem. The # by itself doesn’t “mean” anything. It isn’t like *, ^, + or – in that sense. It’s not an operator.

Comments closed

Some Follow-Up Regarding ByRef

A reader asked me to clarify something about my previous post. Their question was:

When MyMethod is written as:

Sub MyMethod( i() as integer )
  i = array(10,20,30)
  system.debuglog CurrentMethodName + " i(0) = " + str(i(0)) + " i(1) = " + str(i(1)) + " i(2) = " + str(i(2))
End Sub

What happens if instead of trying to assign a new array you just alter the values in the array passed in?

Comments closed

Which DLLs can I move and where?

After seeing this conversation on the forums, I thought it would be helpful to run through why you can move some of your app’s DLLs but you cannot move others.

On Windows, the Visual Studio C Runtime DLLs can be in one of two locations on systems that do not already have them installed. All versions of Windows prior to Windows 10 would need these installed.

Comments closed