> According to the Reference stack, the three constants
> "return", "linefeed", and "cr" are all predefined to code 10
> (linefeed). No constants are listed as being pre-defined to
> code 13 (what I would think of as carriage return).
>
> On the Mac, however, "cr" does not in fact appear to be
> defined.
Correction - I made a silly mistake, "cr" is indeed defined, with the
value code 10.
Is there a logic that I have missed behind having all three of these
constants have the same value? I can see the logic of having a constant
the value of which is what MetaCard uses to delimit lines; and for naming
that constant "return" (although something like "linebreak" might be less
ambiguous). But why should define both "cr" _and_ "return" to have the
value which is not what anyone who knows ASCII would expect????
I suppose that question is mostly rhetorical (though I'd be most
interested if someone could explain). So what I'm still interested to
know is:
> Is there a predefined constant whose value is a one
> character string, that character having the code 13?
...and if not, what do other people use? Is there a convention for the
name? And what's the most elegant way to define this (remember I'm a
newbie): can you define a constant whose value is determined by a function
- ie "numtochar(13)"? And where would you put the definition - in the
stackscript on startup? In the Home stack? If I put it in the
stackscript, will I get a problem if I open a second stack in which I've
defined the same constant? etc...
TIA,
Ben Rubinstein | Email: [EMAIL PROTECTED]
Cognitive Applications Ltd | Phone: +44 (0)1273-821600
http://www.cogapp.com | Fax : +44 (0)1273-728866
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.