J (programming language)/Annotations

From Wikiversity
Jump to navigation Jump to search

These notes pertain to version j701 (both the installation and the J Primer retrieved for that version).

Tacit Definition[edit | edit source]

On the page describing Tacit Definition (i.e., ~addons/docs/help/primer/tacit_definition.htm), the author shifts gears. Previously in the book, the terms "x" and "y" are used for the left and right arguments, respectively.

In the first paragraph on this page, however, "x." and "y." are used instead. In prior versions of the language, "x." and "y." are used. In j701, however, the "." has been dropped by default. When reading the book, then, one needs to remember to omit the ".".

Alternatively, one can tell the interpreter to permit the archaic usage of permitting the "." in the argument names. To do this, you need to use a foreign conjunction. Specifically, we will use the Global Parameters foreign conjunction:

   (9!:49) 1          NB. Permit usage of x., y., m., n., u., and v.

Explicit-to-tacit translator[edit | edit source]

In j701, there are 2 GUI environments: (1) JHS and (2) JGTK. The first one, JHS, is accessible from within a web browser. The second one, JGTK, is a "windowed terminal." Neither have an interface option for changing the display characteristics...

So, when the passage instructs you to "Use the Edit|Configure to select Linear Display," we must, again, rely on a foreign conjunction. This time it is the Representation set of foreign conjunctions. The same holds true for the instruction, "Use the Edit|Configure to select the Box Display:

   (5!:5) < 'ft'          NB. Switch to linear display for the verb ft.
   (5!:2) < 'ft'          NB. Switch to box display for the verb ft.