Foreign !:

From J Wiki
< Help(Redirected from Help/Primer/Foreign !:)
Jump to navigation Jump to search


<=   =>

J interfaces with the environment are provided by the conjunction !: (foreign). In most cases the foreign result is a verb that provides a specific service. The left argument of foreign selects a general family of services and the right argument selects a specific service. The families of services selected by the left argument are:

  0  scripts
  1  files
  2  host commands
  3  types
  4  names
  5  representations
  6  time
  7  space
  9  global parameters
 11  windows
 13  debug
 15  dynamic link library (shared library)
 18  locales
128  numerical functions


An overview of the foreign conjunction is documented in NuVoc with more detailed documentation in the Vocabulary of the J dictionary .

You have run across a few specific uses of the foreign conjunction in earlier sections.

The derived verb 9!:11 was used in the Print precision section. The 9 selects the global parameters family and the 11 gives a derived verb that sets the print precision.

The load verb uses 0!:0 to load scripts. The left argument selects the scripts family. Look up the definition. The 0 right argument is treated as three decimal digits 000 and therefore executes sentences from a file, stops on an error, and is silent (does not display sentences or results).

<=   =>

Primer Index               Hover to reveal titles   -   Click to access   -   Current page is highlighted
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
45 46 47 48
50 51 52 53 54 55 56 57
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
97 98 99 100 101 102 103 104 105 106