---
title: "delGlobalVar"
canonical: "https://help.vicon.com/space/ShogunPost121/1253736470/delGlobalVar"
format: markdown
---
# Description

Deletes a previously assigned global variable identified by name.

Shogun Post's scripting language supports global variables that are accessible across scripts within a session of Shogun Post. This command will delete a global variable specified by its name.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `delGlobalVar name` |

### Arguments

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

### Flags

None

## Return value

void 

> Macro (scroll-pagebreak)

## Examples

```plaintext
Script A
// Define a global variable 
setGlobalVar myVar 1.1;...

Script B
// Check to make sure global variable set in Script A still exists
if (`getGlobalVarExists myVar`){ 
  
// Use it ... 
  
// Delete the global variable 
delGlobalVar myVar;
```

# Additional information

## Related commands

- [getGlobalBooleanVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736461)
- [getGlobalFloatVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736728)
- [getGlobalIntVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738121)
- [getGlobalStringVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737639)
- [getGlobalVarExists](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736894)
- [getGlobalVectorVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737705)
- [setGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253739295)