Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - kesha

#1
Hi,

http://www.newlisp.org/downloads/newlisp_manual.html#join">//http://www.newlisp.org/downloads/newlisp_manual.html#join



> (set 'MYLIST '("a" "b" "c"))
("a" "b" "c")
> (join MYLIST)
"abc"
> (join MYLIST "-")
"a-b-c"
> (join MYLIST (string "-" (join MYLIST) "-"))
"a-abc-b-abc-c"
#2
newLISP in the real world / Re: bug?
October 07, 2016, 01:19:45 AM
Thanks Lutz!
#3
newLISP in the real world / bug?
October 06, 2016, 11:15:10 AM

newLISP v.10.7.1 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h

> (= 'A 'A)
true
> (= 'A 'B)
nil                                               <--------------- !!!
> (define (Test A B C))
(lambda (A B C))
> (++ (find 'D (first Test)))
1
> (= 'A 'A)
true
> (= 'A 'B)
1                                                <---------------- ???
#4
newLISP newS / Re: segmentation fault
April 25, 2016, 01:46:15 PM
I don't think this is the correct behaviour.

The program falls, without the possibility to fix something.
#5
newLISP newS / segmentation fault
April 25, 2016, 03:38:10 AM
OS: GNU/Linux Gentoo x86_64 and Gentoo x86

gcc: 4.9.3

newLISP v.10.7.0 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h
> (unpack "c" 1)
segmentation fault


newLISP v.10.7.1 32-bit on Linux IPv4/6 UTF-8, options: newlisp -h
> (unpack "c" 1)
segmentation fault

Oops...
#6
newLISP in the real world / Re: case
December 04, 2012, 07:12:00 PM
It's just food for thought on the use of recursion.

If refined, could get interesting.

For example:

#!/usr/bin/env newlisp                                                                    

(define (test-case KEY)
  (case KEY
    (0 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (1 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (2 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (3 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (true (println "END CASE..."))))

(test-case 0)

(exit)
; eof

-------------------------------------------------------------

KEY => 0
KEY => 1
KEY => 2
KEY => 3
END CASE...
#7
newLISP in the real world / case
December 04, 2012, 01:17:58 PM
Hi All,

how can perform multiple checks.

(define (test-case KEY)
  (case KEY
    (0 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (1 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (2 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (3 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (4 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (5 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (6 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (7 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (8 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (9 (begin (println "KEY => " KEY)(test-case (++ KEY))))
    (true (println "END CASE..."))))