Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.1 - English

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab help >> API Scilab > Scilab Gateway API > Scierror

Scierror

C gateway function which displays an error message to the user (same profil as the printf function) and returns an integer value specifying an error level

Calling Sequence

void Scierror(error_level,format,value_1,..,value_n)

Arguments

error_level

an integer value specifying an error level

format

a char* string. Specifies a character string combining literal characters with conversion specifications.

value_i

Specifies the data to be converted according to the format parameter.

returns

If the operation is successfull, this function returns the number of characters printed (not including the trailing '\0' used to end output to strings).

If an error occurred, a negative value is returned.

Description

Scierror is a C gateway function which displays an error message to the user (same profil as the printf function) and returns an integer value specifying an error level. You must include Scierror.h to benefit from this function. This header is provided in the output_stream module (this directory should be included by default).

Examples

In this example, the C gateway function prints an error message and returns the error level 133.

#include <stack-c.h>
#include <Scierror.h>

int sci_myscierror(char * fname)
{
  Scierror(133,"An error has occured: %d\n", 1);

  return 0;
}

See Also

  • printf_conversion — printf, sprintf, fprintf conversion specifications
  • printf — Emulator of C language printf function
  • sciprint — A C gateway function which displays standard messages to the user (same profil as the C printf function)
<< Rhs Scilab Gateway API Scilab C Types >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Mar 03 10:59:47 CET 2011