chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Re: time/date


From: Anthony Carrico
Subject: [Chicken-users] Re: time/date
Date: Thu, 27 Mar 2003 11:53:25 -0500
User-agent: Mutt/1.4i

On Thu, Mar 27, 2003 at 03:26:46PM +0100, Felix Winkelmann wrote:
> Hi!
>
> Just change the "int" argument type-specifier in posix.scm (line 1137)
> to "integer".
>
> Sorry.

I think I'm still missing something. When working with time values,
how do I specify 32bit integer literals, do 32bit arithmetic, etc.?

(define seconds->string2
  (let ([ctime (foreign-lambda c-string "C_ctime" integer)])
    (lambda (secs)
      (let ([str (ctime secs)])
        (unless str (##sys#error 'seconds->string2 "can not convert seconds to 
string" secs))
        str))))

(display (seconds->string2 1073741823)) (newline)
(display (seconds->string2 1073741824)) (newline)

bash-2.05b$ chicken test.scm
compiling `test.scm' ...
Warning: exact literal exceeds range in line 9
"1073741824"

--
Anthony Carrico




reply via email to

[Prev in Thread] Current Thread [Next in Thread]