Dear Barry,<br>Thanks a lot for the pointer. This also reminds me the sprintf... <br><br>Yan<br><br><div class="gmail_quote">On Sat, May 7, 2011 at 11:34 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><br>
On May 7, 2011, at 9:12 PM, Ryan Yan wrote:<br>
<br>
> Dear All,<br>
> I have a question about the function call PCFieldSplitSetFields() in the developer version.<br>
><br>
> I would like to name of each field separately, and using some<br>
> rule based on the count of i.<br>
><br>
> For instance, I would try:<br>
> for (i = 0; i < m/3; i++) {<br>
> ierr = PCFieldSplitSetFields(pc,"0",xxx,xxx);<br>
> ierr = PCFieldSplitSetFields(pc,"1",xxx,xxx);<br>
> }<br>
><br>
> When m=3 this is fine, since there is only one pass, namely, '0' and '1' is fine<br>
> When m=6, I want 4 fields. But how can I set up the name as '3' and '4' after the first pass in the loop.<br>
><br>
> I think the question is how to fill up an char[] dynamically as a integer array?<br>
<br>
</div> The standard C function scanf().<br>
<font color="#888888"><br>
Barry<br>
</font><div><div></div><div class="h5"><br>
><br>
> This might be a naive question, but I did not come up any way of doing it.<br>
><br>
> Many thanks,<br>
><br>
> Yan<br>
<br>
</div></div></blockquote></div><br>