---
title: "Work with HSL return values"
canonical: "https://help.vicon.com/space/Shogun111/13207571/Work%20with%20HSL%20return%20values"
format: markdown
---
To use many of the Shogun Post scripting operations, or to create custom Shogun Post user windows, you must know how to work with values returned by commands.

> Macro (scroll-only)
> 
> > Macro (toc)

## Use left-hand single quotation marks

One way to return the value of a command is to enclose a command within left single quotation marks. You can then assign the enclosed command to a variable and display the result in the Log.

> ✅ **Tip**   
> ✅ To create a left single quotation mark (`), press the key to the left of the number 1 on your keyboard.

For example:

```plaintext
// Define a variable called $a
string $a;
// Set $a to the value returned by the get property command
$a = `getProperty Name LFHD`;
// Print the return value to the Log.
print( $a );
```

This script prints the contents of $a, LFHD in this case, to the Log. In the example above, the getProperty command returns a string. Therefore, the variable on the left side of the equal sign must also be a string to accept this return value.

In the following example, left single quotation marks are used to define a user window:

```plaintext
int $dlg;
int $textBox;
// Create the user window. Call it "Test User Window"
$dlg = `createWindow "Test"`;
// Create the Text Box User Control, adding it to User Window we just created
$textBox = `createTextBox $dlg`;
```

> Macro (scroll-pagebreak)

## Use C calling convention

As an alternative to using left-hand single quotation marks, you can also return values from Shogun Post commands using a C function syntax in order to collect a return value:

|  |
| --- |
| `$a = getProperty( Name, LFHD );` |

The only time this calling convention may not be used is when options are being specified with the function call. The command below could not be written using the C function syntax because it specifies a command option -all.

```plaintext
select -all;
```

The three following examples are all equivalent statements.

```plaintext
snapToSytem LFHD 3.4 5.6 6.7;
snapToSystem( LFHD, 3.4, 5.6, 6.7 );
LFHD.snapToSystem( 3.4, 5.6, 6.7 );
```