<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<!--(==============================================================)-->
<!--(Document created with RoboEditor. )============================-->
<!--(==============================================================)-->

<head>

<title>pninsert</title>

<!--(Meta)==========================================================-->

<meta http-equiv=content-type content="text/html; charset=windows-1252">
<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">
<meta name=generator-major-version content=0.1>
<meta name=generator-minor-version content=1>
<meta name=filetype content=kadov>
<meta name=filetype-version content=1>
<meta name=page-count content=1>
<meta name=layout-height content=676>
<meta name=layout-width content=1027>


<!--(Links)=========================================================-->

<link rel="StyleSheet" href="default.css">



</head>

<!--(Body)==========================================================-->


<body>

<h1>pninsert</h1>

<h2>Purpose</h2>

<p>Programmatically insert a nonliteral node into the parse tree.</p>

<h2>Syntax</h2>

<p style="line-height: normal;
			margin-bottom: 14pt;
			margin-top: 14pt;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;">returnedPnode = pninsert(name,pnode,after_n)</p>

<p style="margin-left: 40px;
			line-height: normal;
			margin-bottom: 14pt;
			margin-top: 14pt;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;">returnedPnode - type: pnode<br>
name - type: str <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->Name for nonliteral node<br>
pnode- type: node <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->Node to insert after or before<span style="margin-left: 40px;
	line-height: normal;
	margin-bottom: 14pt;
	margin-top: 14pt;
	x-text-tab-stops: repeat 1in;
	white-space: nowrap;
	font-family: monospace;
	font-size: 10pt;"><br>
after_n - type: int <!--kadov_tag{{<spaces>}}-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--kadov_tag{{</spaces>}}-->If == 1, insert after. If == 0, insert before</span></p>

<h2>Returns</h2>

<p>Returns the created and inserted node.</p>

<h2>Remarks</h2>

<p>Can only be used within the @CODE region, not meant to be used in rule 
 action regions.</p>

<h2>Example</h2>

<p># Get the root node of the parse tree, go to its first child, add a 
 _BLANKLINE node after the child.<br>
# This function helps place separators and other markers or sentinels into 
 a parse tree.<br>
L(&quot;n&quot;) = pndown(pnroot());<br>
pninsert(&quot;_BLANKLINE&quot;,L(&quot;n&quot;),1);</p>

<h2 style="margin-bottom: 0;">See Also</h2>

<p><a href="pnmove.htm">pnmove</a></p>

<p>&nbsp;</p>

</body>

</html>
