What you think about this method I created?
char array_keys = {"empty", "full"}
char array_values = {"0", "0.1", "0.4", "1.20"}
int array_map = {[0,1], [0-2], [0-3], [1-4]} (multi dimension array to link stuff for us)
int array_deleted = {[0,1,V], [2,0,K]}
(*this part was added after) we could also add delete because in some language once deleted the field still exist as empty. When creating dynamic layouts the fields will still show. You can check if they are empty in the code but you have more options this way like adding stuff to deleted fields, instead of creating new ones. May need a 3 dimension array to represent also what kind of field : keys or values.
it instantly creates category's and avoids keep track on thigs you just add and remove.
just feed the loop width this 3 arrays and it do the rest.
and we have the information all structured for us :
empty : 0, 0.1, 0.4
full : 1,20
You can do it width other stuff like OOP but if need more performance.
No comments:
Post a Comment