Difference between revisions of "Talk:Documentation/BASIC Guide/Arrays"
From Apache OpenOffice Wiki
(add comment on examples) |
(→Multi-dimensional: new section) |
||
Line 10: | Line 10: | ||
(copied from the bottom of the Article page. Please post all discussions and comments to the Discussion page.) | (copied from the bottom of the Article page. Please post all discussions and comments to the Discussion page.) | ||
--[[User:Ccornell|Ccornell]] 14:34, 20 June 2008 (CEST) | --[[User:Ccornell|Ccornell]] 14:34, 20 June 2008 (CEST) | ||
+ | |||
+ | == Multi-dimensional == | ||
+ | |||
+ | The example for multi-dimensional is awful, because the number for each dimension is the same 5. | ||
+ | |||
+ | Here's what it currently says. | ||
+ | |||
+ | : In addition to single dimensional data fields, {{OOo}} Basic also supports work with multi-dimensional data fields. The corresponding dimensions are separated from one another by commas. The example | ||
+ | |||
+ | : <source lang="oobas">Dim MyIntArray(5, 5) As Integer</source> | ||
+ | |||
+ | : defines an integer array with two dimensions, each with 6 indexes (can be addressed through the indexes 0 to 5). The entire array can record a total of 6 x 6 = 36 integer values. | ||
+ | |||
+ | : You can define hundreds of dimensions in {{OOo}} Basic Arrays; however, the amount of available memory limits the number of dimensions you can have. | ||
+ | |||
+ | Shouldn't how to store and access entries in these also be described? --[[User:Ashawley|Ashawley]] 01:43, 27 February 2009 (UTC) |
Revision as of 01:43, 27 February 2009
Please expand...
- how do you set a value in an array?
- example: see Documentation/BASIC Guide/Loops.
- I added a very simple example, but as I'm only starting, I don't know more ways - I'd also expect something like "myArray = [1, 2, 3] to work, as in many other languages, but I couldn't find how to do that --HenningSprang 14:38, 22 November 2008 (CET)
- can arrays be appended to other arrays?
- can an item be inserted into an array?
- can an array be indexed with strings or other values?
(copied from the bottom of the Article page. Please post all discussions and comments to the Discussion page.) --Ccornell 14:34, 20 June 2008 (CEST)
Multi-dimensional
The example for multi-dimensional is awful, because the number for each dimension is the same 5.
Here's what it currently says.
- In addition to single dimensional data fields, Apache OpenOffice Basic also supports work with multi-dimensional data fields. The corresponding dimensions are separated from one another by commas. The example
-
Dim MyIntArray(5, 5) As Integer
- defines an integer array with two dimensions, each with 6 indexes (can be addressed through the indexes 0 to 5). The entire array can record a total of 6 x 6 = 36 integer values.
- You can define hundreds of dimensions in Apache OpenOffice Basic Arrays; however, the amount of available memory limits the number of dimensions you can have.
Shouldn't how to store and access entries in these also be described? --Ashawley 01:43, 27 February 2009 (UTC)