Versions Compared

Key

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

 

On this page:

Table of Contents

 

...

Warning

Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data Center? Click here !

Contents

Table of Contents


The include statement allows you to execute code and use UDRs  that are written in other SIL SIL™ files. This can improve readability and make your code more manageable.

...

Include statements must be the first statements in your program, before the definition of UDRs.

Info

For more information see  Structure Of A SIL Programof a SIL™ program.

 


The provided path may be relative or absolute. If relative, it is resolved relative to the defined 'sil.home' environment variable, usually the 'silprograms' directory. 

Variable visibility

There are two categories of variables you can use in the included programs.

...

Local Variables

These are the variables you define in the body of the included program. These can be used throughout the included program, as well as in your SIL SIL™ program which that included the file.

Code Block
titlefile.incl
function increment(int x) {
  return x + 1;
}
number a = increment(0);

...

Notice the use of variable a in the SIL SIL™ program even though it was declared in the included file. Also notice the use of the increment()  UDRwhich  that was defined in the included file as well.

...

Global variables

These are the variables that are already defined and can be used right away (issue fields and customfields). You can use these anywhere in your code without having to declare them.

Code Block
titlefile.incl
function getKey() {
  return key;
}

See also