forums

TNT Basic Forums > Programming Q&A
Size limit on arrays
< Last Thread     Next Thread >
Author
Thread        Post A Reply

10-14-2008 06:35

Posted by:
Harbinger

Location:
Florida,USA

Click Here to Email Harbinger   Find more posts by Harbinger

I have a found a way to use a single linear array to hold all the data in a planar matrix. IOW, i can store and manipulate the points in a x-by-y map within a single row of variables. For example, if i have an 12-by-12 map, the points can be stored in n[144].

What i need to know is: is there a limit in the number of components in a linear array? That is, is TNT going to have a problem with the statement:

int n[1048576]

for a map that's 1024x1024? How much memory is that using?

10-14-2008 20:43

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

provided the machine has 1048576 * 8 bytes of memory available, it should be okay.

10-18-2008 03:12

Posted by:
Harbinger

Location:
Florida,USA

Click Here to Email Harbinger   Find more posts by Harbinger

Good to know. Thank you again appleide!!

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.