Difference between revisions of "Declaring Variables"
Jump to navigation
Jump to search
no edit summary
imported>Cipscis (Aliases - "int" and "long" for "short", "reference" for "ref") |
imported>Dandys |
||
Line 1: | Line 1: | ||
;short:-2,147,483,648 to 2,147,483,647 | ;short:-32,768 to 32,767 | ||
;long:-2,147,483,648 to 2,147,483,647 | |||
;float:-3.402823×10<sup>38</sup> to -1.175494×10<sup>−38</sup>, 0 and 1.175494×10<sup>−38</sup> to 3.402823×10<sup>38</sup> (precision of 7 digits) | ;float:-3.402823×10<sup>38</sup> to -1.175494×10<sup>−38</sup>, 0 and 1.175494×10<sup>−38</sup> to 3.402823×10<sup>38</sup> (precision of 7 digits) | ||
;ref:A pointer to a reference | ;ref:A pointer to a reference | ||
Line 9: | Line 10: | ||
</pre> | </pre> | ||
"Short" variables can also be declared with the | "Short" variables can also be declared with the keyword "int", and "ref" variables can use the keyword "reference". | ||
A local variable can be placed anywhere within the script code, it only needs to be declared before the first command that uses it. Usually you declare all variables on top of the script, though, to improve the script's readability. | A local variable can be placed anywhere within the script code, it only needs to be declared before the first command that uses it. Usually you declare all variables on top of the script, though, to improve the script's readability. |