type data elements individually
Posted: Fri Apr 19, 2013 11:02 pm
I'd like to wish for the ability to mix strings and numbers in Data. Since strings are turned into pointers, would this not be possible?
Alternatively, (and maybe even preferably) can we type each data element individually?
The reason for the request:
At this time, a loop is required to initialize an array (which is a hack to those who have worked with languages with array initialization), and it also requires separate data lines for every data type. Those two limitations severely diminish readability as well as ease of maintenance. This requested feature would allow a more compact (easier-to-read) method to initialize array sets and/or structures.
Thanks.
Code: Select all
Data.i 5, "text1"
Data.i 432, "text2"
Code: Select all
Data 432.i, "text2", 5.b ; strings are "auto-typed"
Data 976.i, "MoreText", 8.b
At this time, a loop is required to initialize an array (which is a hack to those who have worked with languages with array initialization), and it also requires separate data lines for every data type. Those two limitations severely diminish readability as well as ease of maintenance. This requested feature would allow a more compact (easier-to-read) method to initialize array sets and/or structures.
Thanks.