Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleAvailability

This routine is available starting with SIL Engine™ 2.5.13 / 2.6.5.

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

runSILInline(script, args)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Executes the script with the given arguments.

Executes the script with the given arguments.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

script

...

String

Yes

Script to be executed.

args

string[]

Yes

Arguments for the script.

Return

...

Type

stringString[]

The output of the script 

Example

Code Block
string [] result = runSILInline("return \"SIL is \" + argv[0];", "awesome"); // returns "SIL is awesome"

string script = "number sum = 0; for (string s in argv) { sum += (number)s; } return sum;"; 
string [] argsArr = "1|2|3";
string [] result = runSILInline(script, argsArr); // returns "6"

...

Note

Note

  1. If you don't need/have any arguments, pass an empty string for the args parameter.
  2. You need to perform all the necessary escapes.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "system_routines" and space = currentSpace ( )
labelssystemarray_routines