Re: I do not find in the documentation 4.XX describe GET
- Posted by _tom (admin) Mar 19, 2014
- 1390 views
The second question was not logical from my point of view, the situation in which "print" is included in the built-in functions and "get" is described in "get.e"
I expect that to get historically was written later and no became one of the built-in and is not fair
It is a "design choice" not to have many routines built-in; the O[ interpreter is simpler and faster as a result.
So, print is needed often: make it a built-in. And, get not needed often: belongs to an include file.
p.s. In my services I accept the sequence {..., ...} and answer them {..., ...}(as others do it with json or xml). and this is the problem of those who seek to understand the format of standard format strings.
When learning O[ you must understand that everything is a number.
Try reading http://openeuphoria.org/wiki/view/The%20All%20Mighty%20Object.wc to get an idea of how things work.
The string "Hello" becomes {72,101,108,108,111} in Euphoria--there is no string data-type.
sequence str = "Hello" print(1, str ) --> {72,101,108,108,111} -- converted to numbers not a string data-type puts(1, {72,101,108,108,111} ) --> Hello puts(1, str) --> Hello -- you can always display a sequence of integers to look like a string
Most of the time the idea "accept and answer" works as if there was a string data-type.
When saving and then reading sequences you will have to remember the intended use of each item in the sequence. An item in a sequence is not atuomatically identified as a number or a string.
If you provide a sample of the data you are writing and reading it will be easier to explain how this works.
_tom