Where Xojo isnt fully 64 bit

In Xojo an array is limited to being no more than 2 billion entries (2,147,483,646 )

But arrays are documented as using integers which, in a 64 bit world, should be a LOT more entries than this.

When this post was written the documentation isnt clear about what the maximum size of an array IS. It just said :

sizeIntegerThe upper bound of the array. Size must be a number or a constant.

Thats been altered now and the case noted above marked “fix” . Documenting a shortcoming isnt the same as fixing the shortcoming though.

In a 64 bit application Integer usually means a 64 bit integer but in reality arrays dont use Integer, they use Int32. This limitation isnt considered a bug as

The Integer type is Xojo compiler/framework magic. Behind the scenes, LastIndex (and Ubound) are Int32 because we still support 32 bit OSs. Should the day come when we no longer support 32 bit operating systems, we could then change arrays to Int64 but even that would then be a LOT of work involving updating the compiler, the frameworks, etc.

In most Xojo code and use cases we never have to worry about “compiler magic”1 etc and integer is an Int64 in 64 bit apps and an Int32 in 32 bit programs.

As users we shouldn’t have to know, or care about “magic” – it should just work like it does everywhere else.

1 In a language like C++ this “magic” amounts to something like

// your C++ compiler MAY define specific tags to tell if you're compiling 32 or 64 bit
#if 64Bit // with whatever specific code your C++ compiler needs to tell this is a 64 bit build
   typedef int64_t integer ;
#elif 32Bit // with whatever specific code your C++ compiler needs to tell this is a 64 bit build
   typedef int32_t integer ;

They even have code in their headers for plugins that handles this (this is from the 2020r2 Plugin SDK include file REALplugin.h)

#if defined(__LP64__) || defined(_WIN64)
	#define TARGET_64BIT 1
	#define TARGET_64BIT 0

#include <stdint.h>
#include <stddef.h>

typedef int64_t RBInt64;
typedef uint64_t RBUInt64;
typedef int8_t RBBoolean;
typedef uint32_t RBColor;

	typedef int64_t RBInteger;
	typedef uint64_t RBUInteger;
	typedef int32_t RBInteger;
	typedef uint32_t RBUInteger;

UPDATE : Christian found another spot where Xojo isnt 64 bit

UPDATE : Xojo fixed the documentation and marked the original report “fixed”. But fixing the docs doesnt fix the actual issue reported.
I have an older feature request to make arrays 64 bit