swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Batch mode option + customized option


From: Alex Lancaster
Subject: Re: Batch mode option + customized option
Date: 25 May 2000 02:41:21 -0600
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6

>>>>> "P" == P deVries <address@hidden> writes:

P> Is there any syntax description of the lisp files?  

The swarmapps (heatbugs, moustrap, tutorial) all have examples of the
Lisp (Scheme) ".scm" format for reading/writing objects.

Swarm also has a test suite, and if you build the source version, and
run "make check" in tests/defobj and tests/collection you will a whole
gamut of different objects being serialized/deserialized.

The syntax borrows heavily from (but is not identical to) the syntax
for the Scheme programming language:

 http://www.swiss.ai.mit.edu/~jaffer/r5rs_toc.html

P> I would like to know especially how to get: #:filename "coyote.out"
P> If I create a lisp output of an instance containing the variable
P> "char[x] filename", I get the following: #:filename #1(#\c #\o #\y
P> #\o #\t #\e #\. #\o #\u #\t #\000) What must be the type of
P> filename to get the first, better readable, output?

Try declaring your instance variable as a const char *:

  // input filename
  const char *filename;

When you serialize/deserialize a const char pointer, the Archiver
knows it is a string and formats it accordingly.

Alex
-- 
Alex Lancaster * address@hidden * www.santafe.edu/~alex * 505 984-8800 x242
Santa Fe Institute (www.santafe.edu) & Swarm Development Group (www.swarm.org)

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]