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

[REBOL] Re: (No subject)Date: Sat, 11 Nov 2000 11:36:19 +1100

From: coussement:c:itc:mil:be at: 13-Nov-2000 8:48

Brett: Thanks for the hints. I finally found the right and efficent way to meet my requirements. Here is a sample of the code, it might help someone with the same problem : if not exists? db-file [save db-file []] db: load db-file ;--- create an entry for a if not exists --- if none? select db a-id [ append db reduce [a-id reduce [c-date]] ] ;--- create an entry for t for the a if not exists --- if none? select select db a-id t-id[ append select db a-id reduce [t-id[]] ] ;--- if an exists, replace it by new else write it down --- either none? pick select select db a-id t-id q-id [ ;--- write an-id --- append/only select select db a-id t-id reduce [an-id an-time] ][ ;--- replace an-id --- change pick select select db a-id t-id q-id reduce [an-id an-time] ] ;--- save to disk --- save db-file db Best regards, C. COUSSEMENT