Mapa mental
Variables:static, global, local
Conteúdo do mapa
Variables:static, global, local
when program is run, static variables are stored in a location in memory and have a lifespan that klast while the program is running.
- Eg. if you assign the number 2.14 to a static variable will still contain 2.14 whenever you run the sub procedure until the whole program stops running
When a dynamic variable is defined, it is assinged a new loaction
Local
- defined inside na sub procedure and is only accesible from within that sub procedure. This is known as scope
- Advantage - much easier to tack changes to a variable and reason for the changes when it is only used within a sub procedure + can prevent variable from being over wriiten by something else in yopur program
global
- Wideer scope
- defined globally and so is accesible from anywherte within a program
- advanatge - sometimes it can be the most efficient way of ensuring that a piece of sata is accesible to all sub procedures
Informações
- Descrição
- Cambridge IGCSE Computing (Computer Software) Mapa Mental sobre Variables:static, global, local, criado por rwc.carlton em 01-05-2015.
- Criado por
- rwc.carlton
- Visualizações
- 0
- Avaliação