Prev Next Index-> contents reference index search external Up-> overview format special newlinech overview-> License why Install get_started running files titles+headings cross format spellchecking latex other browser glossary wish_list whatsNew format-> nobreak pre codep codei color hilite th center table list special font special-> dollar cmark rmark newlinech accent escape tabsize newlinech Headings-> Syntax See Also Purpose character Example y n x Discussion of Example Reference

Setting Programming Source Code Comment Character

Syntax
$newlinech character$$ See Also codep Purpose Some computer languages do not have a multi-line comment mode. The newlinech command enables you to put OMhelp commands in the source code for these languages. character There must be zero or one character in character and it can not be the  character. Leading and trailing white space in character is ignored. All subsequent occurrences of character at the beginning of a line are ignored. In addition, if a space follows such an occurrence of character , the space is also ignored. (Only one such space is ignored.) Example ----------------------------------------------------- The input:  c newlinech c$$ c$bold Syntax:$$icode/y/ = logdet(/n/, /x/)/$$ c c $head y$$c The return value italic y$$ has prototype c$codei/ c real /y/ c /$$c It value is set equal to the log of the determinant of italic x$$. c c $head n$$c The argument italic n$$ has prototype c$codei/ c integer /n/ c /$$c it specifies the dimension of the matrix italic x$$. c c $head x$$c The argument italic x$$ has prototype c$codei/ c real /x/(/n/, /n/) c /$$c it must be a square positive semi-definite matrix.  ------------------------------------------------------ results in the output:  c Syntax: y = logdet(n, x) y The return value y has prototype  real y  It value is set equal to the log of the determinant of x . n The argument n has prototype  integer n  it specifies the dimension of the matrix x . x The argument x has prototype  real x(n, n)  it must be a square positive semi-definite matrix. ------------------------------------------------------ Discussion of Example In the example above, note that the c that occurs before the first newlinech command is not ignored. You can avoid this by placing the newlinech command on the same line as the begin command for the section. For example, the input  c begin logdet$$ $newlinech c$$c bold Syntax:$$$icode/y/ = logdet(/n/, /x/)/$$c c head y$$ c The return value $italic y$$has prototype c codei/ c real /y/ c /$$   . . . would not result in any of the c characters at the being of the input line being printed because all characters before the begin command are ignored. Reference The newlinech command has effect till the next such command is executed or the end of the current section (which ever comes first). The command $newlinech   removes the effect of the current newlinech command without providing a new character to replace it.
Input File: newlinech.omh