Re: Printing to be read

2009-09-10 Thread Michael Wood
2009/9/9 Brian Hurt : [...] > So, my question is this: is there a way to print a structure out in a > fashion that it can be read back in correctly (i.e. with strings being > quoted), and without having to write my own print function? To go along with the other answers, you will want to bind *rea

Re: Printing to be read

2009-09-10 Thread B Smith-Mannschott
On Wed, Sep 9, 2009 at 00:16, Richard Newman wrote: > >> So, my question is this: is there a way to print a structure out in >> a fashion that it can be read back in correctly (i.e. with strings >> being quoted), and without having to write my own print function? > > prn. > > user=> (prn {:foo ["

Re: Printing to be read

2009-09-08 Thread Richard Newman
> So, my question is this: is there a way to print a structure out in > a fashion that it can be read back in correctly (i.e. with strings > being quoted), and without having to write my own print function? prn. user=> (prn {:foo ["bar" 5.0]}) {:foo ["bar" 5.0]} nil --~--~-~--~

Printing to be read

2009-09-08 Thread Brian Hurt
So I have a situation where I want to spool out a data structure as a file where I want to be able for a human to read & modify this structure, and then be able to read it back in. At first I thought this was going to be easy- just use print to write out the structure, and then use read to read it