Versions Compared

Key

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

...

Info
titleAvailability

This routine is available since starting with katl-commons 2.5.13 / 2.6.5.

Syntax

...

runSILInline(script, args)

Description

...

Excerpt

Executes the script with the given arguments

Parameters

...

Parameter name

Type

Required

Description

script

string

Yes

The script to be executed

argsstring[]YesThe arguments for the script

Return type

...

string[]

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"

 

Notes

...

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

See also

...

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "system_routines"
labelssystem_routines