On Wed, Nov 9, 2011 at 9:28 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><div class="gmail_quote">On Wed, Nov 9, 2011 at 15:22, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>So the problem is that in C++, when using a variadic function, you cannot type PETSC_NULL directly into the argument list? When would you ever<div>do this? If an argument to Printf() is equal to PETSC_NULL, no problem. Its only when PETSC_NULL is passed directly. Why not prevent that in</div>


<div>all PETSc variadic functions, which I think are only the prints.</div></div></blockquote></div><br></div><div><div>include/petscdmcomposite.h:extern PetscErrorCode   DMCompositeScatter(DM,Vec,...);</div><div>include/petscdmcomposite.h:extern PetscErrorCode   DMCompositeGather(DM,Vec,InsertMode,...);</div>

<div>include/petscdmcomposite.h:extern PetscErrorCode   DMCompositeGetAccess(DM,Vec,...);</div><div>include/petscdmcomposite.h:extern PetscErrorCode   DMCompositeRestoreAccess(DM,Vec,...);</div><div>include/petscdmcomposite.h:extern PetscErrorCode   DMCompositeGetLocalVectors(DM,...);</div>

<div>include/petscdmcomposite.h:extern PetscErrorCode   DMCompositeGetEntries(DM,...);</div><div>include/petscdmcomposite.h:extern PetscErrorCode   DMCompositeRestoreLocalVectors(DM,...);</div></div>
</blockquote></div><br>Yes, I am in favor of getting rid of all variadic functions and replacing them with array arguments.<div><br></div><div>   Matt<br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div>