viernes, 20 de septiembre de 2013

Acciones y punteros

Tutorial 3: Tutorial 3: Actions and Pointers Whats an action? An action is something to do, a function, such as assignation What is a pointer? A pointer is something that points to another variable, array, array position, or a modified variable, array or array position, a pointer is constantly updating itself to the value (modified/unmodified variable, array or array position). How would I go about creating a pointer? 1.Bring down the console by pressing F11 2.Type a name for your pointer, like, John 3.Type an equal sign (=) 4.Start a curly bracket ({) 5.Type the name of another of your variables that you have made, like, TX3 or Zing or Zing 1 6.End your curly brackets (}) 7.Check that you haven't made any mistakes, it should look something like: John = {TX3} 8.Press Enter NOTE: if you are putting a pointer in code, it is advisable to include a semi-colon at the end (;). NOTE2: you can't attach a pointer to a variable/array that does not exist How would I go about creating an action? 1.Bring down the console by pressing F11 2.Type a name for your action, like, JI2MTTX3 (if you are curious about it, it means John is 2 more than TX3) 3.Type an equal sign (=) 4.Start a curly bracket ({) 5.Start with the variable you want to change, like, John 6.Type an equal sign (=) 7.Type the name of another of your variables that you have made, like, TX3 or Zing or Zing 1 8.If you want to do a modification (like add 2 to the variable), add that in after, like, + 2 9.End your curly brackets (}) 10.Check that you haven't made any mistakes, it should look something like: JI2MTTX3 = {John = TX3 + 2} 11.Press Enter NOTE: John will not be changed until you type "JI2MTTX3" and press enter NOTE2: If you are including an action in a code, it is advisable to include a semi-colon at the end (;). NOTE3: You can't attach an action to a pointer/variable/array that does not exist NOTE4: Arrays don't want to be changed by element, you are required to set Arrays to a pointer array (put curly brackets ({}) around the array and put some variables in it)

No hay comentarios:

Publicar un comentario