Katz.FunCtions History

Hide minor edits - Show changes to output - Cancel

Changed line 2 from:
*[[http://www.arduino.cc/en/Tutorial/Variables|Variables, Scope,]] You have to understand scope before reading about passing variables in Functions
to:
*[[http://www.arduino.cc/en/Tutorial/Variables|Variables, Scope,]] You have to understand scope before reading about passing variables in Functions.
Added line 4:
Here is another page on this if needed. http://arduino.cc/en/Reference/scope
Changed lines 3-5 from:
A variable declared inside the Function '''loop''' can only be accessed from inside '''loop'''. If you declare a variable inside '''setup''', it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in

@@global int i; // declares a variable named i and makes its scope global@@
to:
A variable declared inside the Function '''loop''' can only be accessed from inside '''loop'''. If you declare a variable inside '''setup''', it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere.
Changed line 9 from:
*[[http://arduino.cc/forum/index.php/topic,42934.0.html|A discussion of ways to pass information to and from functions]] but it does not discuss the '''Swap''' function that is also useful if you want a single function to modify a variable but do it from different parts of a program.
to:
*[[http://arduino.cc/forum/index.php/topic,42934.0.html|A discussion of ways to pass information to and from functions]] but it does not discuss the '''swap''' function that is also useful if you want a single function to modify a variable but do it from different parts of a program.
Changed line 3 from:
A variable declared inside the Function '''Loop''' can only be accessed from inside '''Loop'''. If you declare a variable inside '''Setup''', it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in
to:
A variable declared inside the Function '''loop''' can only be accessed from inside '''loop'''. If you declare a variable inside '''setup''', it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in
Changed line 7 from:
*[[http://falcon.tamucc.edu/wiki/Katz/FunctionTutorial|How do I work with functions 0 (Katz) A demmonstration program]]
to:
*[[http://falcon.tamucc.edu/wiki/Katz/FunctionTutorial|How do I work with functions (Katz) A demonstration program]]
Changed line 9 from:
*[[http://arduino.cc/forum/index.php/topic,42934.0.html|A discussion of ways to pass information to and from functions]] but it does not discuss the Swap function that is also useful if you want a single function to modify a variable but do it from different parts of a program.
to:
*[[http://arduino.cc/forum/index.php/topic,42934.0.html|A discussion of ways to pass information to and from functions]] but it does not discuss the '''Swap''' function that is also useful if you want a single function to modify a variable but do it from different parts of a program.
Changed lines 3-5 from:
A variable declared inside the Function '''Loop''' can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in

global int i; // declares a variable named i and makes its scope global
to:
A variable declared inside the Function '''Loop''' can only be accessed from inside '''Loop'''. If you declare a variable inside '''Setup''', it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in

@@global int i; // declares a variable named i and makes its scope global@@
Changed line 3 from:
A variable declared inside the Function ''Loop'' can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in
to:
A variable declared inside the Function '''Loop''' can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in
Changed line 3 from:
A variable declared inside the Function ""Loop"" can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in
to:
A variable declared inside the Function ''Loop'' can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in
Changed line 3 from:
A variable declared inside the Function @@Loop@@ can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in
to:
A variable declared inside the Function ""Loop"" can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in
Changed lines 3-5 from:
A variable declared inside the Function Loop can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in

global int i;// declares a variable named i and makes its scope global
to:
A variable declared inside the Function @@Loop@@ can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in

global int i; // declares a variable named i and makes its scope global
Changed lines 2-5 from:
*[[http://www.arduino.cc/en/Tutorial/Variables|Variables, Scope, read before reading about passing variables in Functions]]
to:
*[[http://www.arduino.cc/en/Tutorial/Variables|Variables, Scope,]] You have to understand scope before reading about passing variables in Functions
A variable declared inside the Function Loop can only be accessed from inside Loop. If you declare a variable inside Setup, it can only be used there as well. Variables that are declared before the Setup function are global and can be used anywhere. Alternately you can precede a variable declaration with the word global as in

global int i;// declares a variable named i and makes its scope global
Added lines 1-6:
Read First
*[[http://www.arduino.cc/en/Tutorial/Variables|Variables, Scope, read before reading about passing variables in Functions]]

*[[http://falcon.tamucc.edu/wiki/Katz/FunctionTutorial|How do I work with functions 0 (Katz) A demmonstration program]]
*[[http://www.arduino.cc/en/Reference/FunctionDeclaration| Arduino Reference on Functions]]
*[[http://arduino.cc/forum/index.php/topic,42934.0.html|A discussion of ways to pass information to and from functions]] but it does not discuss the Swap function that is also useful if you want a single function to modify a variable but do it from different parts of a program.