Scilab Function
fr - eng


SetString - Convert Scilab string to ascii code

Module

Description

This function can be used to convert a Scilab string into a vector of integer (int8) corresponding to the ascii code of the string.

For i.e, this is usefull when passing a string -like a file name- in Scicos computational function via interfacing function with the help of the 'opar' parameter.

See the 'Example' section for use it with a C computational function.

Calling Sequence

myint8 = SetString(str)

Parameters

Example

//In interfacing function -set case-
fil1='/home/user/data_1.dat'
fil2='/home/user/data_2.dat'
...
model.opar=list(SetString(fil1),SetString(fil2))
/* In a C computational function */
#include "scicos_block4.h"
....
void myFunc(scicos_block *block,int flag)
{
SCSINT8_COP *fil1;
SCSINT8_COP *fil2;
....
fil1=Getint8OparPtrs(block,1);
fil2=Getint8OparPtrs(block,2);
...
}

File content

Authors

Alan Layec METALAU Project-Team