Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - Русский

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

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

Справка Scilab >> API Scilab > Scilab Gateway API > sciprint


A C gateway function which displays standard messages to the user (same profil as the C printf function)

Calling Sequence

void sciprint(format,value_1,..,value_n)



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


Specifies the data to be converted according to the format parameter (%s, %d, ...).


This C gateway function provides the capabilities to display messages to the Scilab user. Basically; it emulates the C language printf function. You must include sciprint.h to benefit from this function. This header is provided in the output_stream module (this directory should be included by default).

Note that if you want to trigger an error, the function Scierror is more appropriate.


In this example, the C gateway function prints several messages illustrating the use of the sciprint function in the Scilab console.

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

int sci_mysciprint(char * fname)
  sciprint("printing an integer: %d\n", 1);
  sciprint("printing a double:   %f\n", 2.1);
  sciprint("printing a string:   %s\n", "test");

  return 0;

See Also

  • printf_conversion — mprintf, msprintf, mfprintf conversion specifications
  • mprintf — converts, formats, and writes data to the main scilab window
  • 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
Report an issue
<< sci_types Scilab Gateway API double >>

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:
Fri Apr 11 14:19:50 CEST 2014