After a very very very long reflexion, I finally understand precisely what
you meant.
In short:
- the only thing that exists are linear arrays
- array index must always be a number
- the only way to simulate a 2D array, or nested variables is to store
values in one array, search a patern in it, get the index of this match,
and use this index to read an other twin array.
In some complex case, the value read in the second array will be a complex
number (integer vs decimal, or units vs tens vs hundreds for a 10x10x10
table) ...
I had never used such a limited language, so I had never needed to cut
down array manipulation; even in ASM it's more simple: multiply indexes,
add a base address, and you got a cell; if need to grab the coordinates,
search the patern in the whole memory, deduce relative address, and you
can recompute the coordinates. Tasker forces me to use more basic tools,
what makes things somehow more complex for me.
But today, I REALLY need a rich array.
And I have finally fully understood what can be done in Tasker, and what
can't. Now, I know how to do what I need :)
On 14/06/12 18:26, Dennis wrote:
> Great!
> Well, it's documented (
>
http://tasker.dinglisch.net/userguide/en/variables.html ), but somewhere
> around I've read that even Pent forgot about this feature. It is a nice
> thing, just rarely used.
> Also, I had to dig around a bit in the documentation to find some other
> variables I remembered:
>
http://tasker.dinglisch.net/userguide/en/activity_elementedit.html#tap
> So, you could use %scene_name to make this a bit more universal.
> Aka, in a scene a "do i need to create" could be launched.
> IF %BARNUM~*%scene_name*
>
> FLASH "This is the first time this scene ever runs, so here I launce
> whatever I want to do as create. Big part of it obviously is to get
> the documentation structure going, so the documentation can always be
> done inside the scene, not just in Tasker"
> VARIABLE SET %BARNUM = %scene_name APPEND ON
> VARIABLE SPLIT %BARNUM
>
> VARIABLE SET %temp=%BARNUM(#?%scene_name)
> VARIABLE SET %Foo(%temp) = "This is the default help text for scene
> %scene_name, please change it by long clicking the help button"
>
> END IF
> This could even go into its own task that you could just reference from
> each scene, so it might save you some typing.
>
--
>o_/ DEMAINE Benoit-Pierre (aka DoubleHP)
http://benoit.demaine.info/