This is a very handy overview. If this isn't already similarly
organized on the wiki (and I can't recall seeing anything like this)
it would be well worth adding. I imagine it should either fall into
the Beginner FAQ or be linked from it.

On Sun, May 31, 2009 at 2:29 PM, Raul Miller <[email protected]> wrote:
> ...
>
> I think it's important to distinguish between two three different entities in 
> J.
>
> One entity is a "sentence".
>
> Another entity is a "script".
>
> And the third entity is a "block".
>
> In all three cases, these words have technical meanings, in
> the context of J.
>
> A "sentence", in essence, is a single line of executable code.
> Sentences follow J's grammatical rules, and may be evaluated.
> When evaluated, they produce either a noun, verb, adverb or
> conjunction.
>
> A "script" is the thing that you terminate with an isolated
> right parenthesis.  A script is preceded by a sentence and
> thus represents a noun, verb, adverb or conjunction.
>
>   example=: 0 :0
> This is an example script,
> which is being used in a sentence
> which produces a noun
> )
>
> Scripts which represent verbs adverbs or conjunctions must
> contain legal sentences.  Since a line beginning with
> a left parenthesis can not be a legal sentence, any
> legal sentence may contained in a script, without
> conflicting with the terminator.
>
> A "block" is somewhere in between a sentence and a
> script.  It is a sequence of sentences and is delimited
> by control words (such as if. while. do. or end.)  Blocks
> may be nested.  Since control words may not be a part
> of a legal sentence, any legal sentence may be contained
> in a block, without conflicting with any control words.
>
> If the script terminator could be a part of a legal
> sentence, we would have problems.
>
> That said, interactive J does allow scripts to be
> entered.
>
> ...
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to