\section{SPECIAL Special Calling Syntax}

\subsection{Usage}

To reduce the effort to call certain functions, FreeMat supports
a special calling syntax for functions that take string arguments.
In particular, the three following syntaxes are equivalent, with
one caveat:
\begin{verbatim}
   functionname('arg1','arg2',...,'argn')
\end{verbatim}
or the parenthesis and commas can be removed
\begin{verbatim}
   functionname 'arg1' 'arg2' ... 'argn'
\end{verbatim}
The quotes are also optional (providing, of course, that the
argument strings have no spaces in them)
\begin{verbatim}
   functionname arg1 arg2 ... argn
\end{verbatim}
This special syntax enables you to type \verb|hold on| instead of
the more cumbersome \verb|hold('on')|.  The caveat is that FreeMat
currently only recognizes the special calling syntax as the
first statement on a line of input.  Thus, the following construction
\begin{verbatim}
  for i=1:10; plot(vec(i)); hold on; end
\end{verbatim}
would not work.  This limitation may be removed in a future
version.
\subsection{Example}

Here is a function that takes two string arguments and
returns the concatenation of them.
\begin{verbatim}
    strcattest.m
function strcattest(str1,str2)
  str3 = [str1,str2];
  printf('str1 = %s, str2 = %s, str3 = %s\n',str1,str2,str3);
\end{verbatim}
We call \verb|strcattest| using all three syntaxes.
\begin{verbatim}
--> strcattest('hi','ho')
str1 = hi, str2 = ho, str3 = hiho
--> strcattest 'hi' 'ho'
str1 = hi, str2 = ho, str3 = hiho
--> strcattest hi ho
str1 = hi, str2 = ho, str3 = hiho

\end{verbatim}
