- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> May 29, 1997
- 1810 views
Why?? ~~~~~~ Why would you want it to save the values as ascII ??? If you would read it back in, and use puts() to display it on the screen, it will look like those names, and not like those numbers. I can not understand why the file has to be readable for humans, your program can read it back in and Euphoria automatically displays it right!! Howcome?? ~~~~~~~~~~ Euphoria has 2 datatypes atoms and sequences. (as you know) A atom is just a value, a set of bits in memory. A sequence is a structured collection of atoms. Euphoria simple saves the values returned by gets() Gets returms a sequence, a collection of values. In dos and any other ascII based operating system, there are 256 different characters, each having their own value. For example 'A' = 65 and 'B' = 66 In euphoria everything inside of these: ' ' is the same as the value in the system's ascII table. Everything inside of these: "" is the same as a sequence containing the values of all characters of the piece of text. When you do: puts(1,"Hi!") The routine doesn't recieve a text, but a sequence with values and the function puts those values in the screen memory and the operation system will then display the picture that belongs to the value. For the value of 65, it is the picture of an 'A' as you see it on the screen. Size.. ~~~~ If it's the size that you are worried about, use my Euphoria Data Object Manager to save a sequence to disk in the shortest way possible, and with compression!! Good luck, Ralf Nieuwenhuijsen nieuwen at xs4all.nl