Arrays in Rev (long)

Andre Garzia soapdog at mac.com
Mon Jul 12 10:00:20 EDT 2004


Rob,

that's a very usefull code.... :D I wish I had this before!

Thanks!
andre


On Jul 12, 2004, at 10:50 AM, Rob Cozens wrote:

>> A temporary  stack as an advanced multi-dimensional variable? If this 
>> is the case, I  think I like that much better than trying to force my 
>> own metaphor down  the throat of Rev by trying to create 
>> multidimensional arrays inside  something which really has no support 
>> for them.
>
> Troy, et al:
>
> Rev can support non-keyed multidimensional arrays using multiple 
> delimiter characters.
>
> Three-dimensional example:
>
> on putValue 
> thevalue, at theArray,xcoord,ycoord,zcoord,xdelim,ydelim,zdelim
>    set the itemDelimiter to xdelim
>    put item xcoord of theArray into firstLevel
>    set the itemDelimiter to ydelim
>    get item ycoord of firstLevel
>    set the itemDelimiter to zdelim
>    put theValue into item zcoord of it
>    set the itemDelimiter to ydelim
>    put it into item ycoord of firstLevel
>    set the itemDelimiter to xdelim
>    put firstLevel into item xcoord of theArray
> end putValue
>
> functyion getValue theArray,xcoord,ycoord,zcoord,xdelim,ydelim,zdelim
>    set the itemDelimiter to xdelim
>    get item xcoord of theArray
>    set the itemDelimiter to ydelim
>    get item ycoord of it
>    set the itemDelimiter to zdelim
>    return item zcoord of it
> end getValue
>
> -- 
>
> Rob Cozens
> CCW, Serendipity Software Company
>
> "And I, which was two fooles, do so grow three;
> Who are a little wise, the best fooles bee."
>
> from "The Triple Foole" by John Donne (1572-1631)
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-- 
Andre Alves Garzia ð 2004 ð BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list