Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #2188
| Newsgroups | comp.lang.postscript |
|---|---|
| Date | 2015-02-25 22:57 -0800 |
| Message-ID | <df14b6cc-9819-433d-ad3f-b61d7edddfb4@googlegroups.com> (permalink) |
| Subject | A strange syntactic loophole available in xpost (gs doesn't do it). |
| From | luser- -droog <mijoryx@yahoo.com> |
While cleaning up a bug in my scanner which was preventing me from
placing a closing curly-brace in a string in a procedure, eg. this
{ (}) }
was giving me an undefined error. This was because it builds the
array on the stack, essentially doing the manual method:
[ object object object ] cvx
But it was using "dictionary" semantics to detect the closing brace.
That is, the scanner calls itself recursively in a loop until the
top of stack compares equal to the closing curly, "}".
So that's why it was blowing up on the string in the proc, but the
real story is that } is a name, an executable name. It's hard to
get at, and mean to use, but in xpost at least. It's a 1-character
self-delimiting token. So you *could* (if you're sufficiently
perverse), define a procedure.
(}) { some crazy shit }
Which can *only* be executed from the top level. Because it's painful
to get it into a proc. You can't use //immediately-loaded names,
because that happens in the "child call" of the scanner, and so a
resulting } will terminate the proc. You'd have to hard-patch it,
and that's going to lose you any golfing gains. Oh, yeah. This is
only potentially useful for golfers. Rest of ya'lls just wasted some
time! haha.
Back to comp.lang.postscript | Previous | Next — Next in thread | Find similar
A strange syntactic loophole available in xpost (gs doesn't do it). luser- -droog <mijoryx@yahoo.com> - 2015-02-25 22:57 -0800
Re: A strange syntactic loophole available in xpost (gs doesn't do it). tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2015-02-26 16:33 -0500
Re: A strange syntactic loophole available in xpost (gs doesn't do it). luser- -droog <mijoryx@yahoo.com> - 2015-02-26 23:02 -0800
csiph-web