I got again weird behaviour coding in newlisp.
I'm using newLISP v.10.7.5 64-bit on Windows UTF8 libffi using the NewLisp GS v.1.6
The downloaded zipped version was a bit lower and then I downloaded the last exe and dll and overwrite the installed ones.
Now when I type this function in edit area of NewLisp GS or in REPL area, it is defined right:
Code: Select all
> (define (utf8code c) (cond ((< c 128) "0xxxxxxx") ((< c 2048) "110xxxxx 10xxxxxx") ((< c 65536) "1110xxxx 10xxxxxx 10xxxxxx") ((< c 1114112) "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx")))
(lambda (c)
(cond
((< c 128) "0xxxxxxx")
((< c 2048) "110xxxxx 10xxxxxx")
((< c 65536) "1110xxxx 10xxxxxx 10xxxxxx")
((< c 1114112) "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx")))
Code: Select all
> (define (utf8code c)
(cond ((< c 128) "0xxxxxxx") ((< c 2048) "110xxxxx 10xxxxxx") ((< c 65536) "1110xxxx 10xxxxxx 10xxxxxx") ((< c 1114112) "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx")))
ERR: missing parenthesis : "...(define (utf8code c) \n"
> "0xxxxxxx"
ERR: missing parenthesis : "...\"11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\"��e"
Code: Select all
> (define (f a)
ERR: missing parenthesis : "...(define (f a)\n"
Maybe is it a problem terminal not supporting unicode? I tested with windows cmd, windows powershell and mobaxterm (cygwin)