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

[REBOL] Re: Help for a newbie

From: gjones05:mail:orion at: 8-Jun-2001 5:28

From: "Gary Learned"
> I am just embarking on learning REBOL, and playing with data types in an > effort to become comfortable with them. My question relates to blocks, > files and find. > > If I read a directory as in: > > a: read %. > > and then try to find a file name within a, I consistantly receive a null > response. What am I missing? I am trying things such as: > > find a "foo.txt" > find a %foo.txt
Hi, again, Ed,
>> a: read %.
== [%view/ %nutshell_files/ %tensteps_files/ %library/ %archives/ %users-guide/ %rebol-co mmand/ %REBOL-View User's Guide_files/...
>> find a "foo.txt"
== none
>> find a %foo.txt
== none If by null, you mean none, then, in my case the find is returning the correct result, which meanse that neither the string type "foo.txt" nor the file type %foo.txt have been found in the block. This was why yesterday I jokingly said that the file name *does* need to exist. Using the output directly from the console, you can see that if a small file is added to the directory, it is then found by the find.
>> write %foo.txt "bar" >> a: read %.
== [%view/ %nutshell_files/ %tensteps_files/ %library/ %archives/ %users-guide/ %rebol-co mmand/ %REBOL-View User's Guide_files/...
>> find a %foo.txt
== [%foo.txt]
>> delete %foo.txt
Does that help? --Scott Jones