Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 13.5 ('Text Messaging')
Instant purchase and download via GumRoad!

FEATURE

Spot the error

Fun with integers

Issue: 13.5 (September/October 2015)
Author: Markus Winter
Author Bio: Markus is a Molecular Biologist who taught himself REALbasic programming in 2003 to let the computer deal with some exceedingly tedious lab tasks. Some call it lazy, he thinks it smart. He still thinks of himself as an advanced beginner at best.
Article Description: No description available.
Article Length (in bytes): 7,491
Starting Page Number: 13
Article Number: 13503
Related Link(s): None

Excerpt of article text...

I was going over my code, cleaning it up and preparing it for Xojo 64-bit, paying particularly close attention to integers and potential overflow errors. I had thought I was done with overflow errors, but they find new ways to annoy me. Have a look at the following code and guess which ones evaluate to true and which ones result in false (and no peeking at the solution!):

Dim n1 As Integer = 3123456789

MsgBox Str(n1 >= 0)

Dim n2 As UInt32 = 3123456789

MsgBox Str(n2 >= 0)

...End of Excerpt. Please purchase the magazine to read the full article.