Re: Write Binary
- Posted by Daniel Berstein <daber at PAIR.COM> Jun 04, 1998
- 814 views
-----Original Message----- De: Graeme. <hmi at POWERUP.COM.AU> Para: EUPHORIA at cwisserver1.mcs.muohio.edu <EUPHORIA at cwisserver1.mcs.muohio.edu> Fecha: miƩrcoles 3 de junio de 1998 19:32 Asunto: Re: Write Binary >At 05:33 PM 6/3/98 -0400, Art wrote: > >> >> I thought I read that opening a file as "wb" would permit writing >>any object, even though complicated, in one command such as : >> >>integer fnOut >>fnOut = open("file.out", "wb") >>put(fnOut, o) or >>write(fnOut, o) or some such. >> >> Now that I want to do it, I haven't found the right command. Is >>there a way? >> Thanks for your help, Art Adamson > > >You're looking for: > >puts(fnout,someInteger) You meant puts(fnOut,someSequence or someAtom) You can also use print(fnOut, someObject). print() will write a representation of an Euphoria object, you can later use gets() (or was it get()?) to "reload" the object into memory. Regards, Daniel Berstein daber at pair.com