[EMAIL PROTECTED] wrote:

> [EMAIL PROTECTED] wrote:
> >
> >         Say folks: I put up an article I wrote this weekend on using
> > REBOL with the unix shell.  It's a part of some other domain specific
> > REBOL materials I've been assembling.  Have a look and please feel
> > free to send me any feedback you have.
> >
> >     http://www.cs.unm.edu/~whip/rebol-unix-shell.html
>
> 3000 chars on your ~whip/index.html cute :)

hmm, not so sure :-)

>
> REBOL [
>   Title: "Count"
>   Date: 12-Jun-2000
>   Author: "Deryk Robosson"
>   Email: [EMAIL PROTECTED]
>   Purpose: {
>     Count the width of Jeff's site.
>   }
> ]
>
> res: parse read http://www.cs.unm.edu/~whip/ "0"

wrong imho - above line tries to parse the string by "0" char. The result
is:

->> res: parse read http://www.cs.unm.edu/~whip/ "0"
== ["123456789" "123456789" "123456789" "123456789" "123456789" "123456789"
"123456789" "123456789" "123456789" "123456789" "1
23456...

so 3000 of the same items ... hmm, what's that? :-))
ha, now i got it - it's different page, you surely wanted to grab following
one:   http://www.cs.unm.edu/~whip/rebol-unix-shell.html


> i: 0
> foreach result res [
>   i: i + 1
> ]
>

second, - you don't need to do such counts, rebol is much smarter -
"length? res" will return the same  ...

> print rejoin [i " chars wide."]

I told you rebol is much, smarter, no? :-) "print [i "chars wide"]"

so, just one line:

print [length? res: parse/all read
http://www.cs.unm.edu/~whip/rebol-unix-shell.html " " "chars wide"]

Kapito? :-)

Cheers,
-pekr-


> :)
>
> Regards,
> Deryk

Reply via email to