---
title: "Random"
canonical: "https://docs.cuesystem.com/space/CVCHELP/555253869/Random"
format: markdown
---
> Macro (toc)

---

# GetRandomLong

This function returns a random number in the range from 0 to 2147483647.

#### Syntax 

```
Function GetRandomLong() As Long
```

#### Return value 

<u>[Long](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> It is a random number. 

> ℹ️ Function behavior in CVC simulation:
> ℹ️ 
> ℹ️ - CVC since version 21.21.1320 - function returns value in the range from 0 to 2147483647 and function behavior of this function in the simulation is now the same as in units.
> ℹ️ - CVC 1.00 - 21.20  - function returns value in the range  from -2147483648 to 2147483647.

# GetRandomByteString

This function fills in the destination bytestring randomly. 

#### Syntax 

```visualbasic
Function GetRandomByteString(ByRef destinationbytestring As ByteString) As Long 
```

#### Parameters 

destinationbytestring 

<u>[ByteString](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#ByteString)</u> It is the destination bytestring.