Announcement: Remember: you are giving away your fantastic ideas for free, and somebody else might even make money from them (or appear to). That's just how the world works! If you're worried about it, maybe you shouldn't post your ideas here.


Caravel Forum : DROD Boards : Feature Requests : Variable Arrays
New Topic New Poll Post Reply
Poster Message
Kevin_P86
Level: Smitemaster
Avatar
Rank Points: 535
Registered: 06-28-2005
IP: Logged
icon Variable Arrays (0)  
As VortexSurfer pointed out here, variable arrays would be very helpful.

I would agree that arrays are a very good idea. And like other scripting languages, they would not need to be "real" arrays. All that would need to happen is to have the variable name
array[index]
mapped to the variable name
array_index
(or some other similar thing). And, perhaps even multi-dimensional arrays, which are treated similarily:
array[index1][index2]
is mapped to
array_index1_index2
for example.

In this case, you do not need to "declare" an array, or specify a size for an array, etc. Essentially, this can be thought of just a more flexible way to describe variable names (specifically, using variables as part of a variable name).

This also causes no problems with subscript errors (since a reference to an undeclared variable creates it), and would allow much more flexible arrays (i.e. arrays could be indexed by a string, if you like).

Thoughts?

____________________________
+++++[>+++++<-]>[>+++>++++>+++++<<<-]>.>+.>-------.<++++.+++++.
04-13-2007 at 11:03 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Feature Requests : Variable Arrays
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.