[Top][All Lists]

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

Re: strange mkstemp! behavior

From: Stephen Compall
Subject: Re: strange mkstemp! behavior
Date: 13 Sep 2004 09:15:03 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

address@hidden writes:

> I'm not a schemer, but doesn't the above code violate the specs?
> '(let ((name "/tmp/XXXXXX"))' binds 'name' to an inmutable string
> (string constants are inmutable).

You're right, but Guile treats them the same.  Maybe it was different
in R4RS.  Here's from R5RS:

 - procedure: string-set! string k char
     K must be a valid index of STRING .  `String-set!' stores CHAR in
     element K of STRING and returns an unspecified value.

     (define (f) (make-string 3 #\*))
     (define (g) "***")
     (string-set! (f) 0 #\?)                ==>  _unspecified_
     (string-set! (g) 0 #\?)                ==>  _error_

Note _unspecified_ means the form answers an unspecified value, not
that its behavior is unspecified.

Stephen Compall or s11 or sirian

Sin has many tools, but a lie is the handle which fits them all.

virus Craig Livingstone encryption Indigo SCUD missile espionage radar
plutonium Manfurov BROMURE sweep subversive Defcon Project Monarch

reply via email to

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