I have OSX with newlisp 10.6.0 and newLISP-GS v.1.63 installed with homebrew.
I tried the button-demo.lsp from http://www.newlisp.org/guiserver/guiserver.lsp.html and ran into an error.
The line
Code: Select all
(gs:set-color 'ColorPanel (random) (random) (random))
Adding
Code: Select all
(println (random))
0,84018771715471
I could fix the problem by either setting the locale to "en_US" (from "de_DE.UTF-8") or by converting the random number to a string with "," replaced by ".":
Code: Select all
; use prandom instead of random:
(define (prandom)
(replace "," (string (random)) ".")
)
What I mean is.. shouldn't the random float be just a value -- nothing that has comma or period when interpreting its value?
(Is there an implicit conversion to a string where the locale plays its role? Is that useful?)
Curious
t3o