The J development system can load definitions from a locked script file (ijl file). The names defined by running an ijl file can be used normally, but their definitions are hidden from the user. An ijl file normally has a file suffix of ijl. An ijl file is similar to an ijr file, but an ijr file can only be loaded by a runtime system, and an ijl file can be loaded by a development system. This facilitates using proprietary or protected definitions within the framework of an open J development system.
wd'makejl xyz.ijs abc.ijl' NB. create ijl file
The text for abc.ijl is encoded and running it defines its verbs,adverbs, and conjunctions as locked. Locked definitions will not be disclosed by the J interpreter.
0!:1 <'foo.ijs' | wd'makejl foo.ijs foo.ijl' plus =: 4 : 'x.+y.' | 0!:1 <'foo.ijl' mean =: 3 : '(plus/y.)%#y.' | plust=: + | meant=: plust/ % # | | 3 plus 'abc' | 3 plus 'abc' |domain error: plus | |domain error: plus | x. +y. | | 3 plus'abc' mean 'abc' | mean 'abc' |domain error: plus | |domain error: plus | x. +y. | | mean 'abc' 13!:0 [1 | 13!:0 [1 mean 'abc' | mean 'abc' |domain error: plus | |domain error: plus | x. +y. | | mean 'abc' |plus[:0] | 13!:1 '' | 13!:1 '' |domain error | | x. +y. | |plus[:0] | | ( plus/y.)%#y. | |mean[0] | | mean'abc' | | 13!:0 [1 | 13!:0 [1 plus | plus 4 : 'x.+y.' | plus meant f. | meant f. +/ % # | meant