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

[REBOL] Re: Killer Application

From: al:bri:xtra at: 17-Aug-2002 12:23

Dick wrote:
> I want a unique number which is 1 greater than the last one obtained,
worldwide.
> How do I do this in Rebol?
Rebol [ Name: 'Number Title: "Title" File: %Number.r Author: "Andrew Martin" eMail: [Al--Bri--xtra--co--nz] Date: 17/Aug/2002 ] Number: has [File Number] [ File: %Number.txt if not exists? File [ save File 0 ] Number: load File Number: Number + 1 save File Number Number ] probe Number probe Number probe Number probe Number probe Number probe Number halt Which after some tests, produced: 13 14 15 16 17 18 It's not the most optimal solution in the world (there's two 'save words for instance)... You're welcome to use it as you wish. Andrew Martin ICQ: 26227169 http://valley.150m.com/