<geo80>
((== e 1)(put Data (get Data (+ x 3)) (+ (get Data (+ x 1)) (get Data (+ x 2)) ) ) )
<geo80>
((== e 2)(put Data (get Data (+ x 3)) (* (get Data (+ x 1)) (get Data (+ x 2)) ) ) )
<geo80>
((== e 99)(set x (+ N 1))) ) )
<geo80>
(inc 'x 4)
<geo80>
(T (> x N) Data) ) )
<Regenaxer>
Hi geo80! Welcome back!
<Regenaxer>
How is the exact error? There is a context usually
<Regenaxer>
Also, please use upper case local variables
<Regenaxer>
'e' is a function for example
<Regenaxer>
The code is hard to read in IRC, especially on my phone screen, I cannot check the indentation. Can you pastebin it?
<Regenaxer>
But even so I can see that (inc 'x 4) and (T (> x N) Data) are on the same level
<Regenaxer>
So the 'cond' is misformed
<geo80>
Hi Regenaxer! sorry was occupied. Oh! ok all noted, unfortunatelly i cannot open pastebin.com here at the office, might be blocked.. anyway I tried to move the (inc 'X 4) but still it shows the same message
<geo80>
its says
<geo80>
!? (put Data (get Data (+ X 3)) (* (get Data (+ X 1)) (get Data (+ X 2))))
<geo80>
NIL -- Cons pair expected
<geo80>
?
<Regenaxer>
So 'Data' seems not to be a list
<Regenaxer>
If 'get' has a number (+ X 3), it expects a lisw
<Regenaxer>
hmm, you said (setq Data (1 9 10 ...
<Regenaxer>
I think 'Data' is modified meanwhile
<geo80>
? Data
<geo80>
-> (1 9 55 3 2 3 11 0 99 30 40 50)
<geo80>
?
<Regenaxer>
hmm, ok
<Regenaxer>
Did you fix the 'cond'?
<geo80>
and yes, the code will modify the list
<geo80>
ah wait
<Regenaxer>
btw, seems it could be 'case' instead of 'cond' anyway
<Regenaxer>
Also, (T (> x N) Data) seems wrong
<Regenaxer>
(> x N) has no effect
<Regenaxer>
hmm, it is all strange ;)
<Regenaxer>
(get Data X)
<Regenaxer>
'X' is a number
<Regenaxer>
ah, ok, forget that
<Regenaxer>
What exactly do you want to do?
<Regenaxer>
I now see that the code is not so much wrong
<Regenaxer>
I thought (T ...) refers to 'cond'
<Regenaxer>
but it is to 'loop'
<Regenaxer>
I really cannot decipher the code here ;)
<geo80>
hehe sorry, im still finding way to pastebin brb
<Regenaxer>
I use ix.io - never pastebin
<Regenaxer>
Vip even has an ix.io command built-in
<Regenaxer>
Can paste the current edit buffer directly