@Raul: It bothered me too that 'if' and 'unless' had the same definition.

I considered moving the negation to 'if', which would make 'then' and
'else' the same.

I hadn't imagined using this without an 'else' block, or trying  to nest
them,
since there's only so much room on one line... But another way to solve it
would
be an end delimiter. Perhaps the word 'end' could be an adjective that
modified
a gerund. If 'then' is a conjunction it could be reused with an 'elseif'
verb, too.

J would parse it like so:

   (if | unless)  ((p0 then q0)  (elseif (pN then qN))*  (else qN1)? end)

I'm starting to imagine that one way to write an interpreter or compiler in
J might
be to first write a simple lexer with regexes or ';:',  then map each token
to
a corresponding word in j to produce one giant tacit expression.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to