NB. (Comment) Noun/Other

Back to: Vocabulary

Used to insert a comment in J code, either in the J session or in a user definition. Everything from NB. to the end-of-line (LF) will be ignored by the interpreter.

NB. Example of a verb definition...
foo=: verb define     NB. you can put a comment here to describe the verb.
NB. A comment can have a line to itself,
NB.
NB. -or it can stand in for a blank line

NB. -but actual blank lines are allowed too
smoutput 'y=' ; y     NB. you can have a trailing comment,
NB. -but not a leading comment, except to dummy out the line:
NB. smoutput 'y=' ; y
NB.You can often crush the comment right up to the period
NB. ...but it doesn't like to be followed directly by a period
NB. -so it's best to follow NB. by a space.
)
NB. but don't append a comment to the final ')' or else: syntax error

)

Common uses

To insert narrative in application code, or to dummy-out unwanted lines which you don't yet want to delete altogether.

See Also


CategoryVoc

Vocabulary/ncapbcapdot (last edited 2012-02-26 16:54:18 by IanClark)