---
title: "getGlobalFloatVar"
canonical: "https://help.vicon.com/space/Shogun18/13668354/getGlobalFloatVar"
format: markdown
---
# Description

Retrieves the value of a specified floating point global variable.

Shogun's scripting language supports global variables that are accessible across scripts within a session of Shogun Post. This command retrieves the value of a specified global variable (identified by the name argument of the command) which stores a double-precision float value.

## Functional area

Data retrieval

# Command syntax

## Syntax

|  |
| --- |
| `getGlobalFloatVar name` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `name` | string | yes | Name of the variable to retrieve |

### Flags

None

## Return value

float

Returns the (double precision) floating-point value stored in the specified global variable. 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Use the global myVar
float $localVar = 2.0;
print($localVar);
if (`getGlobalVarExists myVar`)
{
  // Override local variable with global floating point value 
  $localVar = `getGlobalFloatVar myVar`;
}
print($localVar);
```

# Additional information

## Related commands

- [delGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668772)
- [getGlobalBooleanVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668356)
- [getGlobalIntVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668352)
- [getGlobalStringVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668350)
- [getGlobalVarExists](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668380)
- [getGlobalVectorVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13668378)
- [setGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun18/pages/13674954)