[Omake] join function?
Erick Tryzelaar
erickt at dslextreme.com
Sat Jan 6 19:55:02 PST 2007
Nick wrote:
> Hello list,
>
> First of all I'd like to say that omake is impressive.
> Good work.
> I am porting a gmake project over to omake and have come upon the
> following difficulty -- how do I translate $(join seq1, seq2) to omake?
> join takes 2 sequences of strings and returns a sequence of their
> concatenation.
> For example
> $(join a b c d, .x .y .w .z) returns
> a.x b.y c.w d.z
> Thank you for your help.
Just use the $(array ...) function, like this:
% x[]=1 2 3
- : <array
"1" : Sequence
"2" : Sequence
"3" : Sequence>
: Array
% y[]=4 5 6
- : <array
"4" : Sequence
"5" : Sequence
"6" : Sequence>
: Array
% z=$(array $x $y)
- : <array
"1" : Sequence
"2" : Sequence
"3" : Sequence
"4" : Sequence
"5" : Sequence
"6" : Sequence>
: Array
More information about the Omake
mailing list