Re: String?
- Posted by Rolf Schröder <rolf at rschr.de> May 31, 2004
- 679 views
Juergen Luethje wrote: > > Rolf wrote: > ... > > As I know, a character is a byte that represents a human readable or > > printable symbol. A character string (synonymous: string) is a series of > > characters. i.e., a series of bytes representing human readable|printable > > symbols (words, sentences,...). > > Again: I never heard or read, that the definition of "character" or > "string" depends on the question, whether or not something is printable. > E.g. in BASIC, this is clearly *not* the case. You might also want to > look here: > <a > href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?characters">http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?characters</a> > <a > href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?string">http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?string</a> > Jürgen, I see just that stated there what I said, may be with different words. I got this (computer related) definition from: "Dictionary of Computer Terms" (Webster's) and also from "Computer & Internet Dictionary" (Random House). What is a character for you then (computer related)? Later you wrote: > Like him, you are missing the point. > Using such a user-defined string type doesn't solve the problem: If a > Euphoria program reads e.g. {74,111,104,110} from a file, there is no way > to find out, whether this sequence means "John", or the weight of the > members of my family, or whatever. That's true, specially if a fith byte woul be a zero! Excuse me, but now I think YOU are missing the point: the decision, if you want to print it as an ASCII string or if you want to print simply the numbers, the decision comes by selection the 'tool' YOU select: format {%s} in printf() gives you the text, and i.e. format {%d,%d,%d,%d} in printf would give you the plain numbers. Sincerely, Rolf