Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: On mutability and sameness

From: lmecir:mbox:vol:cz at: 5-Jun-2001 21:43

Hi Joel, (it's in my REP somewhere :-) Seriously: I was curious about the case of DATE! values too.
> >> a: now/date == 5-Jun-2001
I came to the conclusion, the DATE! values are immutable. The expression:
> >> a/day: 6 == 6
may not change a DATE! value. What is going on? See the following functions: test1: func [ date [date!] day [integer!] ] [ date/day: day ] test2: func [ 'date [word!] day [integer!] ] [ set date poke get date 3 day ] a: now test1 a 6 a a: now test2 a 6 a You know what is going on in the case of TEST1 and TEST2. I think, that TEST2 simulates what is going on in the case of a set-path. Regards Ladislav