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

[REBOL] Odd behavior with setting variables Re:(4)

From: webmaster:siliconspecies at: 25-Jul-2000 4:08

Thank You! I will try em. At 08:59 PM 7/25/00 +1200, you wrote:
>Just a few comments. > > > currentpath: "ftp://blah:[blah--blah--org]/blah/blah/" > >Did you know that Rebol works with URLs directly? Like this: > > >> currentpath: ftp://blah:[blah--blah--org]/blah/blah/ >== ftp://blah:[blah--blah--org]/blah/blah/ > >This: > > path: ["blah1" "blah2" "blah3" "blah4" "blah5"] > > is better written as: > paths: [%blah1/ %"blah blah2/" ... > >This: > > loop 5 [ > > is better as: > foreach path paths [ > >Then this: > > append currentpath FIRST path > > workpath: join currentpath ["blah.data"] > > currentdata: load to-url workpath > > becomes clearer as: > workpath: join currentpath [path %"blah.data"] > and workpath is already a url. > >You also seem to be repeating a lot of things in the loop, which perhaps >should be broken up into a separate function? > >I think you'll find that when you clean up your script, your problems will >vanish. > >Andrew Martin >ICQ: 26227169 >http://members.xoom.com/AndrewMartin/ >-><- > >----- Original Message ----- >From: <[webmaster--SILICONSPECIES--COM]> >To: <[list--rebol--com]> >Sent: Tuesday, 25 July 2000 8:34 PM >Subject: [REBOL] Odd behavior with setting variables Re:(2) > > > That worked even less. > > > > I have no idea what is going wrong. I have tried so many things. > > But it will not clear or delete the contents of the variables in addition, > > I actually set the variable again afterwords and it doesn't take. > > > > Here is basic part of code > > > > block: make block! 300 > > currentpath: "ftp://blah:[blah--blah--org]/blah/blah/" > > workpath: "ftp://blah:[blah--blah--org]/blah/blah/" > > path: ["blah1" "blah2" "blah3" "blah4" "blah5"] > > > > ;This is START OF LOOP > > > > loop 5 [ > > append currentpath FIRST path > > workpath: join currentpath ["blah.data"] > > currentdata: load to-url workpath > > currentdata: join #"^"" [currentdata #"^""] > > append block currentdata > > > > append currentpath FIRST path > > workpath: join currentpath ["blah.data"] > > currentdata: load to-url workpath > > currentdata: join #"^"" [currentdata #"^""] > > append block currentdata > > . > > . > > . > > path: NEXT path > > currentpath: copy "" > > workpath: copy "" > > currentpath: "ftp://blah:[blah--blah--org]/blah/blah/" > > workpath: "ftp://blah:[blah--blah--org]/blah/blah/" > > currentfile: join currentblah [".r"] ;this is set in code but not included >here > > save to-file currentfile block > > block: copy [] > > ] > > ;This is END OF LOOP > > > > > > > > > > At 08:02 PM 7/25/00 +1200, you wrote: > > >Try: > > > MyNewString: copy "" > > > MyNewBlock: copy [] > > > > > >Andrew Martin > > >ICQ: 26227169 > > >http://members.xoom.com/AndrewMartin/ > > >-><- > > > > > > > > > > > >----- Original Message ----- > > >From: <[webmaster--SILICONSPECIES--COM]> > > >To: <[list--rebol--com]> > > >Sent: Tuesday, 25 July 2000 5:50 PM > > >Subject: [REBOL] Odd behavior with setting variables > > > > > > > > > > I have been writing some code and can't seem to get consistent >behavior > > > > from 1 loop cycle to another in a FORALL > > > > > > > > basically when I set some variables initially before going into the >loop, > > > > the loop cycles and at end of loop before it comes in again i reset >the > > > > variables to what they need to be. > > > > > > > > but even though i use > > > > > > > > clear variable or > > > > variable: clear variable > > > > variable: "string" > > > > > > > > it does not clear it or set the variable, yet it did work at the > > >beginning. > > > > > > > > so i come into loop fine works, > > > > i reset variables > > > > it loops back around and goes in again > > > > i reset variables > > > > loops back and dies > > > > > > > > HELP! > > > > > > > > Thanks, > > > > > > > > Jeff > > > > Jeff Rubin, CTO/Co-Founder > > > > Audiopia > > > > Shutup and Listen... > > > > http://www.audiopia.com > > > > also check out my personal site Brainbyte! > > > > http://www.brainbyte.com > > > > > > > > > > > > Jeff Rubin, CTO/Co-Founder > > Audiopia > > Shutup and Listen... > > http://www.audiopia.com > > also check out my personal site Brainbyte! > > http://www.brainbyte.com > >
Jeff Rubin, CTO/Co-Founder Audiopia Shutup and Listen... http://www.audiopia.com also check out my personal site Brainbyte! http://www.brainbyte.com