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

[REBOL] Re: Bug! in assignment to date! values with stacked set-path values

From: lmecir:mbox:vol:cz at: 12-Nov-2002 9:46

Hi Andrew, ----- Original Message ----- From: "Andrew Martin" Subject: [REBOL] Bug! in assignment to date! values with stacked set-path values
> >> x: now/date ; Get fresh value. > == 12-Nov-2002 > >> x/month: x/day: 1 ; Now stack up the assignments. > == 1 ; correct value is returned, but... > >> x > == 12-Jan-2002 ; Note that only the MONTH is altered...
This is an artifact that is caused by immutability of dates. (you may remember the discussion on the subject) The x/month: 1 expression is only a hack, no real mutation occurs. Exactly the same hack can be written to modify the bits of integer numbers as I have shown. Regards -L