Next Previous Contents

87. verror

Synopsis

Generate an error condition

Usage

verror (String_Type fmt, ...)

Description

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.

Example

    define open_file (file)
    {
       variable fp;

       fp = fopen (file, "r");
       if (fp == NULL) verror ("Unable to open %s", file);
       return fp;
    }
Notes

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.

See Also

error, Sprintf, vmessage


Next Previous Contents