[REBOL] One more thing - Odd behavior with setting variables Re:

2000-07-25 Thread bhandley

   path: ["blah1" "blah2" "blah3" "blah4" "blah5"]
 
  is better written as:
  paths: [%blah1/ %"blah blah2/" ...

 paths: [%blah1/ %"blah blah2/" (i dont get it)


In this case paths is a block. A block groups a number of values. You've
shown two values - both represent rebol filenames (see the Rebol user's
guide - files - names). The first filename represents a directory, while
the second represents a filename that has a space between "blah" and
"blah2/". The % indicates a filename.

So here is an example combining both concepts that will read the "Program
Files" directory on Windows.
 read %"/c/Program Files/"

Hope it helps.
Brett.





[REBOL] One more thing - Odd behavior with setting variables Re:

2000-07-25 Thread agem



[rebol[]
paths: ["blah1/" "blah blah2/" ]
a: second paths
? a

paths: [%blah1/ %"blah blah2/" ]
a: second paths
? a
]

A is a string of value: "blah blah2/"
A is a file of value: %blah%20blah2/

if you use some functions, they may handle strings and files differently.

 exists? %bak
== true
 exists? "bak"
** Script Error: exists? expected target argument of type: file url.
** Where: exists? "bak"

 
Jeff Rubin wrote

 At 04:08 AM 7/25/00 -0500, you wrote:
 This:
   path: ["blah1" "blah2" "blah3" "blah4" "blah5"]
 
  is better written as:
  paths: [%blah1/ %"blah blah2/" ...
 
 paths: [%blah1/ %"blah blah2/" (i dont get it)
 
 this makes no sense to me.
 
 first there is a % then a space then  %" then "
 
 did ya make a typo in there, cause I can't find a pattern that works.
 

he changed the content? demonstrates how to embed spaces in files.
but confusing.

 
 Jeff Rubin, CTO/Co-Founder
 Audiopia
 Shutup and Listen...
 http://www.audiopia.com
 also check out my personal site Brainbyte!
 http://www.brainbyte.com