Difference between revisions of "Introduction to OBSE arrays"
Jump to navigation
Jump to search
m
→Some final, miscellaneous notes: Punctuation correction
imported>QQuix m (WIKI formatting has been messed up. Fixed.) |
imported>Syscrusher m (→Some final, miscellaneous notes: Punctuation correction) |
||
Line 338: | Line 338: | ||
*References cannot be used as array keys. | *References cannot be used as array keys. | ||
*An array can contain any mix of types for its values. | *An array can contain any mix of types for its values. | ||
*As array elements may contain any type of data, it is the script responsibility to know which is which, so you don't try to assign a string to a ref variable. | *As array elements may contain any type of data, it is the script's responsibility to know which is which, so you don't try to assign a string to a ref variable. | ||
*OBSE keeps track of the number of references to each array and destroys the array when no references to it remain. This makes it unnecessary for scripts to worry about destroying arrays explicitly. | *OBSE keeps track of the number of references to each array and destroys the array when no references to it remain. This makes it unnecessary for scripts to worry about destroying arrays explicitly. | ||
*ForEach and While loops both define structured blocks in the same way that If and Endif or Begin and End do. Every While or ForEach in a script must be matched by exactly one Loop command. | *ForEach and While loops both define structured blocks in the same way that If and Endif or Begin and End do. Every While or ForEach in a script must be matched by exactly one Loop command. |