Generate an error condition
verror (String_Type fmt, ...)
The verror
function performs the same role as the error
function. The only difference is that instead of a single string
argument, verror
takes a sprintf style argument list.
define open_file (file)
{
variable fp;
fp = fopen (file, "r");
if (fp == NULL) verror ("Unable to open %s", file);
return fp;
}
In the current implementation, strictly speaking, the verror
function is not an intrinsic function. Rather it is a predefined
S-lang function using a combination of Sprintf
and
error
.
error, Sprintf, vmessage