[jamming] Command built-in questions (was Re: Executing shell command, save results to variable)

Chuck Homic chuck at vvisions.com
Wed Mar 21 12:46:52 PST 2007


John Waugh wrote:
> Too bad Jam doesn't have multidimensional arrays, then you could have
> an array of lines, each being an array of words...

You can define funky variables to pretend you have 2d arrays.  I do it
all the time.  I need psychological counseling.


foo_1 = whatever dude! ;
foo_2 = some stuff! ;

row = 2 ;
col = 2 ;
echo Hey! $(foo_$(row)[$(col)]) ;

rule function
{
  echo Hey again $($(1)_$(2)[$(3)]) ;
}

function foo : 1 : 2 ; # watch out, you can't say $(foo)

foo = foo ; #unless you do this hack

function $(foo) : 1 : 2 ;


Needless to say, your row ids don't have to be numbers, but they can be.

 -Chuck


More information about the jamming mailing list