You can also do it with FORSKIP which will do the series advancement for you:
forskip series 8 [ set [a b c d e f g h i ] series ... ]
GiuseppeC
... retaining the ability to read the series index ...
DocKimbel
Yep. Now, you know how to use both FORALL and FORSKIP. The advantage of FORALL is that it lets you have full control over how to process the series. FORSKIP is more convenient when you need to process the series with fixed sized records.
GiuseppeC
In fact I will use Forskip as I am processing a DB like series.
DocKimbel
Looks like the best option for your use case.
amacleod
Simplest way to remove a block from a block of blocks?
a: [[A] [B] [C]] == [[A] [B] [C]] >> remove third a == [] >> a == [[A] [B] []]
...but I want the block removed too!
Josh
>> a: [[A] [B] [C]] == [[A] [B] [C]] >> third a == [C]
(that is a hint)
>> head remove next next [[A] [B] [C]] == [[A] [B]]
Gregg
As Josh hinted, THIRD is returning the third element, which REMOVE then operates on. You'll want to use AT, or something, to remove the element. e.g.
>> a: [[A] [B] [C]] == [[A] [B] [C]] >> head remove at a 3 == [[A] [B]] >> a: [[A] [B] [C]] == [[A] [B] [C]] >> head remove find/only a [c] == [[A] [B]]
amacleod
head remove find/only a [c]
this is exactly what I need....
"at" ...new to me!
Thanks all!
Greg,
remove find/only a [c]
seems to work too, without head...
Gregg
Yes, as long as you don't need the result to be at the head.
I just included HEAD to make the result clear in this case.
amacleod
I see...I would want that result with head...thanks
GiuseppeC
Hope there is someone here in the morning as I need quick help:
Hope there is someone here in the morning as I need quick help:
GiuseppeC
I have a variable: mycode: "CODE1" I need to check if exist a series named CODE1 If it does not exist create a series called CODE1 append to CODE1 (taken from mycode) something.