123456789101112131415161718192021222324 |
- <div class="w3-item"><img src="img/icn_variaveis.png" title="icone creation of local variable" class="w3-icon icon_32x32" />
- <h3>Local Variable</h3>
- <p>
- The <i>variables </i> are used to store values.
- In the case of <i>local variable</i>, it is all <i>variable </i> created within a given function.
- In this case, it will be <b>known</b> only within that function.
- <bf/>
- It is recommended that <b>use only this type of</b> variable, avoiding <i>global variables<i>, because the latter can lead to confusion in the code.
- <br/>
- <center>
- <img src="img/var_local.png">
- </center>
- <ol>
- <li><b>Type:</b> defines the type of information to be stored (integer, float, string, logical and array)</li>
- <li><b>Name:</b> defines the name of the variable, used to trigger it from any part of the program</li>
- <li><b>Value:</b> sets a value to be stored in the variable</li>
- </ol>
- </p>
- </div>
|