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

[REBOL] Re: Newbie Q: System time?

From: gscottjones:mchsi at: 24-Jun-2002 16:20

From: Sunanda
<snip> > That code all looks correct -- except the result is wrong. > > Have you accidentally redefined 'now as something else, eg: > > now: "time" > > Check by using the 'source command: > > source now > > An unaltered 'now has this source: > > >> source now > now: native [ > "Returns the current local date and time." > /year "Returns the year only." > /month "Returns the month only." > /day "Returns the day of the month only." > /time "Returns the time only." > /zone "Returns the time zone offset from GMT only." > /date "Returns date only." > /weekday {Returns day of the week as integer (Monday is day 1).} > /precise "Use nanosecond precision" > ] > > Also, stop yourself accidentally redefining system words (if that is what
you
> have done), by putting: > > protect-system > > in your user.r.
Hi, Matt, In addition to what Sunanda said, if you have accidentally redefined a word, simply restart a new REBOL session and everything will be corrected. If you decide to use the "protect-system" option, you will also need to restart REBOL before the changes will take effect. user.r is run upon first starting up. Other scripts can also be run at start up if desired by including something like: do %my-startup-code.r after the exisiting code in the file. Of course, the my-startup-code.r file will need to be stored in the same directory! :-0 :-) Have fun, but be forwarned that REBOL is very, very addictive! --Scott Jones