Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

Syntax

  • Last UpdatedApr 24, 2024
  • 1 minute read

XRS Script language syntax is mostly based on C# with a few differences.

In this section of the documentation you can find the details of XRS Script syntax, primitives, and other technical knowledge that is required to write XRS scripts.

Code example

The source code file for XRS scripts must be a text file with .xrs extention.

This is a code example of XRS Script language syntax.

namespace Test

{

class TestClass

{

public int val_1; //an int instance variable

public static string val_2; //an string class variable

private double val_3;

//this is the constructor

TestClass()

{

int val_4 = 0; // an int local variable

val_1 = 2;

val_2 = "hello";

val_3 = 1;

}

public static void testInstance()

{

// can be accessed with Test::TestClass.testInstance()

}

private void testInstance2()

{

// can be accessed only within the body of the class

}

}

}

TitleResults for “How to create a CRG?”Also Available in