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

[REBOL] Antwort: Re: Antwort: Switch! (LONG)

From: sharriff:aina:med-iq at: 21-Nov-2000 11:13

Hi Brett! You said "Yell", well Im yelling! "result-block: make block! (multiply 2 length? index-block)! could you tell me why you initialized the block in this form? Ive noticed that you pass references to blocks and words by copying, e.g newblock: copy [] does it have an advantage over newblock: make block! 0 ? ----------------------------------------------------------------------------------------------------------------------------------------------- foreach [char file-list] index-some-data read %. [ write-my-page char file-list ] I presume you "read" the directory in "index-some-data" but without the colon? I expected something like this foreach [char file-list] index-some-data: read %. [ write-my-page char file-list ] ----------------------------------------------------------------------------------------------------------------------------------------------- That means I just have to parse the <title> tag contents of all the files in a given directory and pass it as "some-pagerefs" items ? generate-my-page: function [ page-number some-pagerefs [block!] ][html-page][ html-page: copy {} append html-page reduce [<h1> "This is page " page-number </h1>] foreach pageref some-pagerefs [ append html-page <p> append html-page build-tag reduce ['a 'href pageref] append html-page pageref append html-page [</a> </p>] _______________________________________________________________________________________ This is one of the parts that I like best "either indexed-item: find index-block first item [" I never thought that the left to right evaluation in REBOL could also be passed as a expression to "either" or "for" Thanks Brett for your help Best regards Sharriff Aina