newLISP Fan Club

Forum => newLISP in the real world => Topic started by: rrq on August 05, 2015, 06:34:31 AM

Title: date-value parameters
Post by: rrq on August 05, 2015, 06:34:31 AM
Somewhere something changed for date-value, which now doesn't evaluate its parameters, but requires explicit ints. E.g.
(date-value 2015 1 1) ; is fine, but
(date-value (int "2015") 1 1) ; is not, and
(date-value '2015 1 1) ; is also not accepted


This changed for 10.6.3 sometime after May this year, but I didn't realize this until I quite recently upgraded a machine to the "final" 10.6.3 ...



Hopefully it is just a bug, or otherwise it certainly is something to make a clear note about in the documentation.
Title: Re: date-value parameters
Post by: rickyboy on August 05, 2015, 07:48:08 AM
I just confirmed this for pre-10.6.3.


$ newlisp -C
newLISP v.10.6.2 32-bit on Win32 IPv4/6 libffi, options: newlisp -h

> (date-value 2015 1 1)
1420070400
> (date-value (int "2015") 1 1)
1420070400
> (date-value '2015 1 1)
1420070400

Good catch, Ralph!
Title: Re: date-value parameters
Post by: Lutz on August 05, 2015, 02:21:35 PM
This was broken when introducing list-mode for parameters in development 10.6.3. Now fixed in: http://www.newlisp.org/downloads/development/inprogress/
Title: Re: date-value parameters
Post by: rrq on August 05, 2015, 03:07:09 PM
Great. I'll get things upgraded eventually. Meanwhile I'll use the workaround of
(apply date-value (list (int "2015") 1 1))