Code: Select all
(define index? 1)
(map (fn (value3)
(println "Item " index? "= " value3)
(inc index?)
)
(sequence 25 20)
)
Code: Select all
(define index? 1)
(map (fn (value3)
(println "Item " index? "= " value3)
(inc index?)
)
(sequence 25 20)
)
Code: Select all
(map (fn (value3)
(println "Item " (+ $idx 1) "= " value3))
(sequence 25 20))
I should have been clearer in my message! I was referring to my "style" of coding -- more specifically the indenting and seperating some of the closing ")".Kazimir Majorinc wrote:I do not use Newlisp long time but it looks OK to me. You can use $idx also.
Code: Select all
(map (fn (value3) (println "Item " (+ $idx 1) "= " value3)) (sequence 25 20))
Code: Select all
(define (myfunc)
(dowhile ...)
(code line...)
;~ (println "some info") ;<--- debugging line inactive
(code line...)
)
(code line...)
(println "some info") ;<--- debugging line active
(code line...)
)
Thanks for that observation - I hadn't noticed. Answers my question!m i c h a e l wrote:duke,
There is no single, correct way to format newLISP code. Do whatever makes it easier for you to understand the code's structure. Lutz intentionally uses various code formats in the manual to help encourage freedom in this area.
m i c h a e l
[snip all the good stuff]xytroxon wrote:I like to do the open form of parens... It is easier to see what I am doing and easy to add or remove lines of code...
SciTE homepage:dukester wrote:Hey xytroxon...
[snip all the good stuff]xytroxon wrote:I like to do the open form of parens... It is easier to see what I am doing and easy to add or remove lines of code...
Now I know what my prefered form is called ;) I agree with you totally - and I've always wanted to try SciTe. Does it have a newLISP "mode" for syntax highlighting?
Thanks again...
Excellent!!xytroxon wrote:Also I call the open form "dragonfly parens" because: dragonflies are "Slender-bodied non-stinging insect having iridescent wings that are outspread at rest; adults and nymphs feed on mosquitoes etc."...
While the folded up LISP/Scheme form is called "damselfly parens" because: damselflies are "Slender non-stinging insect similar to but smaller than the dragonfly but having wings folded when at rest"
Code: Select all
(define index? 1
)
(map
(fn
(value3
)
(println "Item " index? "= " value3
)
(inc index?
)
)
(sequence 25 20
)
)
Thnaks for the URLs. I'll be giving SciTe a test-drive real soon. Best...xytroxon wrote:You can replace the lisp properties file, Kazimir Majorinc has one for newLISP on his blog page: Click here.