Aaron writes:
Having considered Steve Knight's responses to my criticisms of
the Pepper proposals for changing the quotation conventions in
Pop-11 I now accept that those proposals are workable and probably
preferable to the current Pop-11 conventions, given the use of "\"
as a reserved text item to get over the difficulties I described.
I have not thought through the implications of using "\" in this
role, nor whether this is consistent with its use as the standard
`alphabeticiser' as in "don\'t" which should create a word
containing an apostrophe.
It isn't (consistent with its use as a standard alphabeticiser). Pepper
doesn't have the notion of alphabeticiser; it has something else instead.
For quoting unusual words (ie, one's that don't form normal Pepper
items) you merely need to quote an escaped string; Aarons example
above becomes
"\'don\'t'"
The quotes establish the quote context. The first backslash says
``this actual word (and if it's a string, convert it)''. Then there's
a string literal, inside which the backslash means ``special case
follows'' -- here, insert the quote in the string, rather than take it
as the terminator.
For those brave or perverted enough (such as Certain People who use
identifiers containing control characters in their code), Pepper allows
a string prefixed by a backslash to be used as an identifier *anywhere*
-- just as any word prefixed by a backslash can be used as an identifier.
Thus, if you want to write
42 -> \'Ring\(7)';
you can.
--
Regards, Kers.
"If anything anyone licks, they'll find it all ready in sticks."
|