Talk:Stropping (syntax)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

What is stropping?[edit]

Would a Algol68 parser complain about any of the following two programs?

mode xint = int;
xint sum sq:=0;
for i while
  sum sq≠70×70
do
  sum sq+:=i↑2
od 
mode xint = int;
xint sum sq:=0;
for i while
  sum sq≠70×70
do
  sum sq+:=i↑2
od

--Abdull (talk) 23:00, 10 September 2010 (UTC)[reply]

What is stropping?
A hardware representation for the program text. The reply to the question "how do I type begin on my ASR-33".
Would an ALGOL 68 parser complain about these two programs
  • The first program wouldn't compile, "begin" is not the same as "begin". If it were prefixed by ".pr res .pr" then "begin" would be a valid spelling of "begin", but "xint" would still not be a correct spelling of "xint".
  • The second program would be valid if you had a system that let you type bold text (and a compiler that could read bold text). Most people didn't.
HughesJohn (talk) 09:38, 10 April 2011 (UTC)[reply]

Maybe I'm just new to the term, but doesn't Perl's use of "sigils" qualify as stropping? It flags variables vs language constructs, so there are no "reserved word" restrictions on what you can name your variables, etc. It's optional on functions, though, which may change things. Clsn (talk) 20:55, 12 April 2016 (UTC)[reply]

More examples[edit]

Postscript uses / in the opposite sense, to indicate names that are not to be interpreted. Plain TeX uses \ to indicate control sequences, to separate them from ordinary text. Should we have more examples? Gah4 (talk) 14:18, 10 October 2016 (UTC)[reply]

Cf. shell syntax[edit]

We may want to mention the related situation in the shell, in which commands that match keywords can be called by quoting them. This is in effect the inverse of stropping: When a clash is possible, the non-keyword must be marked. Examples:

 $ if     # Interpreted as keyword
 $ 'if'   # Interpreted as command
 $ \if    # Interpreted as command
 $ i\f    # Interpreted as command

Jérôme (talk) 13:06, 3 May 2017 (UTC)[reply]