User:Dan Bron/Pretix

From J Wiki
Jump to navigation Jump to search

A __p__remature __ret__urn to __i__mmediate e__x__ecution. That is, a sentence which produces no result, in the same way 3 : 'throw.' 0 produces no result.

A pretix is visually indistinguishable from a valid-but-empty result. For example, here's a normal, empty, result:

   i. 0 0
}}} and here's a pretix:


   3 : 'throw.' 0

To distinguish the two, you may use an assignment. If the name remains unassigned after the sentence is executed (without error), you've got a pretix:

   e=. i. 0 0
   f=. 3 : 'throw.' 0

   e                      NB.  e  is defined
   f                      NB.  But  f  is not (value error produced)
|value error: f

   NB.  e is a noun, f is undefined.
   4!:0 ;:'e f'
0 _1

Here's a fun puzzle: find an entirely tacit pretix. (Aside from throw. and this undocumented equivalent, a pretix is a bug, and if you discover one you should report it.)