Understanding Local and Global Variables Functions in Scripts

Slide Note
Embed
Share

Explore the concept of local and global variables in scripting through examples involving favorite fruits like blueberries and apples. Delve into the intricacies of defining types of fruit, crust, and pies while understanding the scope of variables within functions and scripts.


Uploaded on Aug 01, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Local Variables Function Global Variables Main Script

  2. Local Variables Function Global Variables FavoriteFruit: BlueBerries Main Script

  3. Local Variables TypeOfFruit: BlueBerries Function Global Variables FavoriteFruit: BlueBerries Main Script

  4. Local Variables TypeOfFruit: BlueBerries Crust: A Crust Function Global Variables FavoriteFruit: BlueBerries Main Script

  5. Local Variables TypeOfFruit: BlueBerries Crust: A Crust Pie: A Blue Berry Pie Function Global Variables FavoriteFruit: BlueBerries Main Script

  6. Local Variables Function Global Variables FavoriteFruit: BlueBerries MyPie: A Blue Berry Pie Main Script

  7. Local Variables Function Global Variables FavoriteFruit: BlueBerries MyPie: A Blue Berry Pie Main Script

  8. Local Variables Function Global Variables FavoriteFruit: BlueBerries MyPie: A Blue Berry Pie FriendsFavorite: Apple Main Script

  9. Local Variables TypeOfFruit: Apple Function Global Variables FavoriteFruit: BlueBerries MyPie: A Blue Berry Pie FriendsFavorite: Apple Main Script

  10. Local Variables TypeOfFruit: Apple Crust: A Crust Function Global Variables FavoriteFruit: BlueBerries MyPie: A Blue Berry Pie FriendsFavorite: Apple Main Script

  11. Local Variables TypeOfFruit: Apple Crust: A Crust Pie: An Apple Pie Function Global Variables FavoriteFruit: BlueBerries MyPie: A Blue Berry Pie FriendsFavorite: Apple Main Script

  12. Local Variables Function Global Variables FavoriteFruit: BlueBerries MyPie: A Blue Berry Pie FriendsFavorite: Apple FriendsPie: An Apple Pie Main Script

More Related Content