Re: Problems with GET.E

new topic     » goto parent     » topic index » view thread      » older message » newer message

Rob,

Somehow, wrongly, I assumed print() inserts a space after each top
level *number* (betraying my forth past, I suppose). This is not,
strictly speaking, necessary with the other elements, because the
*closing* curly bracket, as well as the quote and double quote
characters themselves can be treated as separators.

You also wrote:

>You could try to fix this by instead seeking back one position at the
>end of get(), so the next get() will see the same character again. I
>don't want to get into this because I don't want to assume that seek()
>will work on all types of files/devices on all platforms. I could also
>attempt to implement an "unget" facility for all Euphoria file I/O,
>but as I said, I don't consider the whitespace separation requirement
>to be so terrible that it requires any major effort to improve it. In
>any case you will always need whitespace between top-level atoms.

The real remedy should be quite clear by now. Change the print command
to output the extra space after each number, or better still, after
each top level object. It will improve readability, so close to so
many hearts in this forum, and it will not break any existing code or
a database. And we will be able to use the 'print/get' pair as
suggested in your documentation *without* any additional hassles.
Truly formatted output is adequately covered by different routines
anyway.

jiri

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu