G
gameon
Guest
I have completed, for the most part, my editable text box which is simply a 1D array. I have for the past few days been doing everything I can to restructure the whole thing for faster read times and smaller readable lines. (Getting it to work was first priority)
One of the main ideas was using the accessor (@) in my scripts for direct reading and returning results. I noticed in my code that sometimes I used the local vars and other times I used the instance vars to return the correct output. I knew about accessing the array directly, it seems that I can also access the instance variables within the array too. Here is one case statement in my switch for scr_delete as an example. The only difference is using line and tline.
Instance vars in create:
VS:
Local temp vars:
Both line and tline seem to work as they are the same number. Is there any difference between using instance vars and local varss with the accessor within the script?
One of the main ideas was using the accessor (@) in my scripts for direct reading and returning results. I noticed in my code that sometimes I used the local vars and other times I used the instance vars to return the correct output. I knew about accessing the array directly, it seems that I can also access the instance variables within the array too. Here is one case statement in my switch for scr_delete as an example. The only difference is using line and tline.
Instance vars in create:
Code:
case"0010":
txt[@ line + 1] = txt[@ line]
txt[@ line] = "";
Local temp vars:
Code:
txt[@ tline + 1] = txt[@ tline]
txt[@ tline] = "";