Changes

341 bytes added ,  15:08, 25 March 2022
no edit summary
Line 9: Line 9:  
Local variables are specific to an individual macro. You should use a local variable when the value is only required in that individual macro. Local variables are accessed via the edit macro screen.
 
Local variables are specific to an individual macro. You should use a local variable when the value is only required in that individual macro. Local variables are accessed via the edit macro screen.
   −
<strong>Variable Types</strong>
+
<strong>Standard Variable Types</strong>
    
A variable can belong to 1 of the 4 following types: <strong>Boolean, Integer, Decimal</strong> or <strong>String</strong>.
 
A variable can belong to 1 of the 4 following types: <strong>Boolean, Integer, Decimal</strong> or <strong>String</strong>.
Line 16: Line 16:  
* <strong>Decimal</strong> type is to store any positive or negative numeric value, with or without decimal digits, in order to make any kind of mathematical calculations or comparison
 
* <strong>Decimal</strong> type is to store any positive or negative numeric value, with or without decimal digits, in order to make any kind of mathematical calculations or comparison
 
* <strong>String</strong> type contains any kind of character (alphanumeric ones or any special ones, such as line feed/carriage return/new line or emojis). <i>HINT: an individual string variable can hold up to 500,000 characters, however it is advisable to avoid very long strings where possible. If you should use strings of great length it is recommended to clear them when finished with.</i>
 
* <strong>String</strong> type contains any kind of character (alphanumeric ones or any special ones, such as line feed/carriage return/new line or emojis). <i>HINT: an individual string variable can hold up to 500,000 characters, however it is advisable to avoid very long strings where possible. If you should use strings of great length it is recommended to clear them when finished with.</i>
 +
 +
 +
<strong>Data Structure Variable Types (Pro Only)</strong>
 +
* <strong>Dictionary</strong> stores a series of key value pairs. For example if you wanted to store a count for each day of the week you would have entries such as dayCount[monday] = 1, dayCount[tuesday] = 3 etc.
 +
* <strong>Array</strong> stores a series of index values.