In einer eMail vom 09.03.00 02:48:04 (MEZ) Mitteleurop�ische Zeit schreibt
[EMAIL PROTECTED]:
>
> Hello, Rebols:
>
> #1
> files: READ %. gets the current directory, but how do we do it with a
> set-word? Example:
>
> directory: %/partition/drawer/drawer
> files: READ %directory(how to deal with "."?)
>
> doesn't work because (among a few things) it tries to read the current
> directory. I don't want to use CHANGE-DIR because then REBOL persists to
> look
> at that drawer, which is *very* annoying when trying to re-run the program.
files: READ directory; no %! type? directory is file..
maybe use %path/ to say you mean directories (at least here(windows)).
>
> #2
> "files" (above) will, eventually, be a block of about 300 file names. I
need
> to know how to take five file names at a time and make a string that is:
> "name+name+name+name+name", to add to a URL.
>
> I didn't see an example of how to parse a string in this way (take five
> elements at a time until the end of block), nor did I see how to
efficiently
> make a string using a repeated separator.
>
> Do I need to deal with the end of the block or is it automatic?
>
print "..the c way"
a: [ 1 2 3 4 5 6 7 ]
until[
n: min length? a 2
for i 1 n 1 [
prin first a
a: next a
]
print []
tail? a
]
print "..the rebol way?"
a: head a
until[
b: copy/part a 2
foreach i b [ prin i ]
print []
a: skip a 2
tail? a
]
> --
>
> ---===///||| Donald Dalley |||\\\===---
>
Volker