% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analyze_three_dots.R
\name{analyze_three_dots}
\alias{analyze_three_dots}
\title{Analyze Three Dots and Return the Names and the Values}
\usage{
analyze_three_dots(..., omit_NULL = 1, print_the_result = 0, debug_Debug = 0)
}
\arguments{
\item{...}{The three dots to be analyzed.}

\item{omit_NULL}{= 0 to include the NULL arguments.}

\item{print_the_result}{= 1 to print the result}

\item{debug_Debug}{= 1 to print intermediate info}
}
\value{
A list of: \cr
name  A vector consisting of the names of each of ... \cr
val   A list consisting of the values of each of ... or NULL \cr
name2  For the named arguments, name2 contains the righthand side of
the equal signs which appear in ... . \cr
For the positional arguments, name2 contains the actual argument itself.
}
\description{
Analyze Three Dots and Return the Names and the Values
}
\details{
... will be analyzed and the pair of ( name, val ) and name2
 will be returned.\cr
 See the first example below.

 Note that, when ... is used, partial match of formal and actual arguments
 may cause a confusing error. \cr
 See the last example below.
}
\examples{
cc="cccc"
analyze_three_dots( a=1, b=c(2,3), cc, list(aa=1,2), diag(2) )
analyze_three_dots( a=1, b=c(2,3), cc=NULL, d=0, NULL )
analyze_three_dots( a=1, b=c(2,3), cc=NULL, d=0, NULL, omit_NULL=0 )

# a function to print all of ... with names
mprint <- function( ... ){
 atd=analyze_three_dots( ... )
 for( i in 1:length(atd$name) ){
  cat(atd$name[i], ":", atd$name2[i],"\n")
  print(atd$val[[i]])
 }
}
mprint( 1:5, b=7:11 )
#'
# About partial match of the arguments
# "e" will be missing
test <- function( exp, ..., debug_Debug=0 ){
	res=analyze_three_dots( ..., debug_Debug=debug_Debug  )
	Print(res)
}
expr="aaa"
test( expr, a=1, b=2, c=3, d=4, e=5, f=6, g=7 )



}
