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

[REBOL] SV: I'm a bit stuck...

From: micael:gullmes:telenordia:se at: 26-Jul-2001 15:36

Here is one way of doing it, balance: $2000 stuff: [ 9-Sep-2001 "here" $70.00 10-Oct-2001 "there" $55.89 5-Nov-2001 "deposit" $100.00 ] foreach [date reason expense] stuff [ either equal? reason "deposit" [ balance: balance + expense ][ balance: balance - expense ] print rejoin ["On " date " the balance was: " balance] ] Brgd /Micael -----Ursprungligt meddelande----- Fran: Tom Foster [mailto:[balayo--mindspring--com]] Skickat: den 26 juli 2001 15:18 Till: REBOL List Amne: [REBOL] I'm a bit stuck... Howdy guys, I'm stuck, actually, on two points. I can make a file filled with: [9-Sep-2001 "here" $70.00] [10-Oct-2001 "there" $55.89] [5-Nov-2001 "deposit" $100.00] I want to subtract from a beginning balance (I ask for that first) unless the "deposit" string is found, then I want to add to it. should I make the file: rebol [] stuff: [ [9-Sep-2001 "here" $70.00] [10-Oct-2001 "there" $55.89] [5-Nov-2001 "deposit" $100.00] ] umm, something with pick, and parse...? =) Thanks -- -tom