Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.0 - Français

Change language to:
English - 日本語 - 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.

Manuel Scilab >> API call_scilab > cwritechain (obsolete)

cwritechain (obsolete)

Write a single string into Scilab memory using call_scilab. Starting with Scilab 5.2, this function is obsolete. See API_Scilab: String writing for remplacement.

int C2F(cwritechain)(char *name, int *myStringSize, char *myString, unsigned long name_len, unsigned long myString_len);

Arguments

name

The name of the future Scilab variable

myStringSize

The length of the string which is going to be write into Scilab memory

myString

The actual String (char *)

name_len

The length of the variable name (fortran compatibility)

myString_len

The length of the string (fortran compatibility)

C2F

C2F is just a macro which provides to this function the ability to be called from fortran

Description

This help describes how to use the function cwritechain.

Using this function will basically do the same as A = "my own String"; but straight into Scilab memory with call_scilab.

Examples

// This example shows how to write a Scilab string in Scilab engine
// It is the equivalent to A="my Message"; in Scilab interpretor
// See: modules/call_scilab/examples/basicExamples/readwritestring.c

// StartScilab
char *myString = "my Message";   /* Declare the string */
char variableName[] = "A"; / * The name of the future variable in Scilab */
int sizeOfMyString=strlen(myString);

C2F(cwritechain)(variableName, &sizeOfMyString  , myString, strlen(variableName), sizeOfMyString); /* Write it into Scilab's memory */

printf("Display from Scilab of A:\n");
SendScilabJob("disp(A);"); /* Display A */

Authors

Sylvestre Ledru

<< cwritebmat (obsolete) API call_scilab cwritecmat (obsolete) >>

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:
Wed Jan 26 16:24:18 CET 2011