Maximum Size for an Array is 4,294,967,296 Elements
AppGameKit does use Signed 32bit Integers., i.e. -2,147,483,647 to +2,147,483,648... there are edge cases when this can be a problem when working with values above 2.147 billion.
With this said., I wouldn't recommend using a Single Array... and not because it won't support what he wants but because of performance.
Array performance drops exponentially with size., for example cycling through 1 million elements is approx. 23x slower than 10 elements 100,000x ... it's the same number of memory / variable accesses but the larger array is slower.
Same is true for For...Next Vs. Repeat..Until
SetSyncRate( 0, 1 )
UseNewDefaultFonts( 1 )
SetPrintSize( 22.0 )
Start# = Timer()
For X = 0 To 9999999 : Next
End# = Timer()
Print( Str( End# - Start# ) )
Start# = Timer()
X = 0 : Repeat : Inc X : Until X > 9999999
End# = Timer()
Print( Str( End# - Start# ) )
Sync()
Sleep( 5000 )
Note: I use 10million iterations as it's still quick to and showcases a clear difference (0.48 and 0.42 on avg. on my CPU)
For reference., increasing to 1billion iterations takes 50s and 43s respectively on my CPU
This does showcase the weird performance from various built-in logic, but more to the point that the increase in iterations doesn't linearly scale.
Again, another reason why he might want to use smaller datasets.
With this said... a question I have is why is he storing these characters?
If for example he is importing words BUT he still wants to store the characters individually, well he could do something like:
Type Words
Word As Integer[]
EndType
Document As Words[]
FildID = OpenToRead( "Document.File" )
Index = 0
Repeat
Character = ReadByte( FileID )
// Space Detected Add a New Word
If Character = 0 Or Character = 32
Index = Document.Length + 1
Document.Length = Index
EndIf
// Store Number or Letter
If Character > 48 And Character < 58
Document[Index].Word.Length = Document[Index].Word.Length + 1
Document[Index].Word[Document[Index].Word.Length] = Character
EndIf
If (Character > 64 Or Character > 96) And (Character < 91 OR Character < 123)
Document[Index].Word.Length = Document[Index].Word.Length + 1
Document[Index].Word[Document[Index].Word.Length] = Character
EndIf
// Store Punctuation
If (Character > 32 Or Character > 57 Or Character > 90 Or Character > 123) And (Character < 48 Or Character < 65 Or Character < 97 Or Character < 127 )
Index = Document.Length + 1
Document.Length = Index
Document[Index].Word[0] = Character
EndIf
Until FileEOF( FileID )
This isn't the most elegant solution as it's like 1am but will read an ascii / utf8 text document in... each Document element is a Word / Punctuation, while each Letter is stored in the .Word array
In this way if you want to know the Length of a given word., you just use Document[Word].Word.Length
And you can still access each individual letter as Document[Word].Word[Letter]
I'm sure if I were more awake I could come up with a better solution., but you get the idea.