How do I make a value global? That is, so that
it can be "seen" by any code in a file, include
user-define functions?
I would also welcome advice as to the pro and cons
of using globals, as well as when best to use
them, and what under what circumstances where such
usage would be a bad idea.
thank in advance.
tim
At 01:19 PM 4/2/00 -0700, you wrote:
>Hi t,
>
>A file! type is a filename with a leading % character. Example: %myfile.r
>%/c/mydir/. A file! may be any type of file, including a directory.
>
>A port! datatype is a low-level i/o abstraction that REBOL uses to
>serialize different types of i/o channels, such as files (here we are not
>talking about the filename, but access to the file's contents), and socket
>i/o.
>
>The access to ports is typically controlled by protocols that define how
>information is read and written to a port, and also commonly implement some
>convenient navigation functions for the port's datastream, such as first,
>next, insert, pick, etc. These functions work in a sensible way on a port!
>datatype. They enable you to treat ports as though they were series values
>(i.e. blocks, paths, hashes ...) to a degree, hence the term serialize is
>used to describe this type of access to i/o channels.
>
>There are some limitations, since not all ports lend themselves to being
>treated as a series effectively with respect to all series! functions.
>
>I haven't been following this thread, so I don't know why you are using
>ports. Generally speaking, it is often more convenient to use higher level
>functions when dealing with files, then accessing them as ports. read,
>write, read/lines, write/append write/lines, write/append/lines, save,
>load, come to mind. All of these functions take a filename (type file!),
>and do not require that you manage the file on the port level, for instance
>with respect to positioning, etc.
>
>
>Hope this helps.
>
>
>
>;- Elan >> [: - )]
>
>