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

AVEVA™ XR Studio

double

  • Last UpdatedSep 17, 2025
  • 1 minute read

This topic is about the double data type.

Value syntax

13.565

12

-2343.4324

Description

Double type represents real numbers and includes both float and double c# type, since float are cast to double. Moreover, numbers are internally treated as double during operations execution and eventually cast to the final data type when they get written to the result variable. See arithmetic operators for further details.

The XRS scripting language currently does not provide a definition of NaN for double type. Hence, in order to check if the value of a double variable is NaN, it is necessary to cast it to string, as in the following example:

value=Runtime::Math.Asin(pi_2);

Runtime::Environment.Assert(value.ToString()=="NaN", "value must be NaN");

Autocasting

Double type supports autocasting for:

  • string, if in the correct input format; otherwise, it will raise an exception.

    double a=”2.1”; //a=2.1;

  • int

    int a=1;

    double b=a; //b=1;

Methods

This table shows the currently implemented methods.

Method 

Return type 

Parameters 

Description 

IsZero

bool

double epsilon

Checks if value is inside [-epsilon epsilon] range. The epsilon parameter is optional, when not set, it uses default value 4.94065645841247E-324.

ToString

string

Returns a string that represents the current double value.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in