Pass Variables between Functions/from One to Another - Python for Integrated Circuits - - An Online Book - |
||||||||
Python for Integrated Circuits http://www.globalsino.com/ICs/ | ||||||||
Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix | ||||||||
================================================================================= Pass variables between functions. code: ============================================ ass variables between functions. code: ============================================ Pass variables between functions. code: ============================================ Pass variables between functions. code: ============================================ Pass variables between functions. code: ============================================ Pass variables between functions. code: ============================================ Pass variables between functions. code: ============================================ Pass variables between functions. code: ============================================ Pass variables between functions. code: ============================================ Pass variables between functions. code: ============================================ Script with "passing variable between functions" and local "x= 0" and Result: x is reset to 0 in the function. code: ========================= Script with "global" and global "x= 0" and Result: x cannot be reset to 0 in the function. code:
|
||||||||
================================================================================= | ||||||||
|
||||||||