> Hello fellow REBOLites,
> 
>   I want to compose filenames, I have a known directory that contains
>   a predefined set of files, now I want to open those files.  In C I'd
>   do something like:
> 
>   #define ROOTDIR "/config/"
> 
>   fopen( ROOTDIR "log.txt", "r); ...
>   fopen( ROOTDIR "prog.cfg", "r"); ...
> 
>   Thus I could change the root directory by changing just one line of
>   code.
> 
>   Can someone provide a REBOL example of this?

Here it is:

>> rootdir: %/config/          
== %/config/
>> join rootdir "log.txt"
== %/config/log.txt         

or 

>> join rootdir %log.txt
== %/config/log.txt 

Regards
Jan

--
Jan Strejcek
[EMAIL PROTECTED]

Reply via email to