integer?
Posted: Wed Dec 10, 2003 2:36 pm
Until now I've been running newLISP.DLL via NeoBook. This morning I installed from newlisp_7301_win-tk-104.exe.
1) Why does newLISP require the c:\temp directory (I'm running WIN2K) when there's a perfectly good temp directory elsewhere in the directory tree? I created c:\temp and newLISP runs fine now. Not a real problem -- just wondering.
2) I installed the non-DLL version of newLISP to test the integer? function. The following seems wrong:
> (map integer? '(1 2 1.1 sam 1sam sam1))
(true true nil nil true nil nil)
The seemingly wrong things are a) integer? is mapped to a list of six arguments but returns 7 results; b) the fifth result (integer? 1sam) returns true!
I wanted to test the integer? function because I noticed that I could call my Roman Numeral converter with (roman 1sam) and it would return "I". The opening test in my program is:
(if (and (integer? n) (> n 0)) ...
Not only did (integer? 1sam) return true, the subsequent code treated "1sam" as an integer of value 1.
1) Why does newLISP require the c:\temp directory (I'm running WIN2K) when there's a perfectly good temp directory elsewhere in the directory tree? I created c:\temp and newLISP runs fine now. Not a real problem -- just wondering.
2) I installed the non-DLL version of newLISP to test the integer? function. The following seems wrong:
> (map integer? '(1 2 1.1 sam 1sam sam1))
(true true nil nil true nil nil)
The seemingly wrong things are a) integer? is mapped to a list of six arguments but returns 7 results; b) the fifth result (integer? 1sam) returns true!
I wanted to test the integer? function because I noticed that I could call my Roman Numeral converter with (roman 1sam) and it would return "I". The opening test in my program is:
(if (and (integer? n) (> n 0)) ...
Not only did (integer? 1sam) return true, the subsequent code treated "1sam" as an integer of value 1.