General:. This page generally describes new functionality in the 91 series of revisions and uploads. This is Working Documentation that with maturity will be moved to the Master Documentation. Work on this release addressed the following areas:
Append to File(,=>
):. This operator works for files just like it works for strings.
However, files can be read-only (RO). If used immediately after the
:create method, the file is opened in write mode. However, if not, you
may need to put it in write mode with ( #false =>[:ro]f ) where
"f" is the symbol for the file object.
Serial out (%->>) and
Serial In (%<<-):. The %->> (convert to
serial out) operator converts the object to a character string which can be
transmitted to another GLEE interpreter. The %<<- (convert from
serial out ... i.e. serial in) operator converts the serial out string back to
the original object.
Serial Out/In for #Pgm:.
Serializing programs is a little tricky. First, we must use the :obj
to get the object instead of invoking the code. Remember that program objects
do not have names associated with them internally. They get their names when
they are assigned into the namespace. When we serialize the code out, we just
get a string ... there is no program name associated with it. When we serialize
that string back in, we get an object ... again with no name associated with
it. To associate the name, we get the :obj object representation and
assign it to a name in the namespace. This is a dramatic divergence from other
languages where the code and their symbolic name are tightly coupled. In
practice I may come to hate this and enforce a tighter name/code-object
relationship. For now I have opted for freedom and self discipline.
Serial Out/In for #Op:. The
issues described in the previous example hold for this example
:.