---
title: slot_float
description: >-
  Parse the STI_AMOUNT in the specified slot and return it as an XFL enclosed
  number
---
import { Tabs, TabItem } from '@astrojs/starlight/components';

### Behaviour

<Tabs>
<TabItem label="C">
* Parse the STI_AMOUNT in the specified slot and return it as an XFL enclosed number
</TabItem>

<TabItem label="JavaScript">
* Retrieves the bigint value associated with the specified slot.
* Returns an error code or the bigint value.
</TabItem>
</Tabs>

### Definition

<Tabs>
<TabItem label="C">
```c
int64_t slot_float (
    uint32_t slot_no
);
```
</TabItem>

<TabItem label="JavaScript">
```javascript
function slot_float(slotno: number): ErrorCode | bigint
```
</TabItem>
</Tabs>



### Example

<Tabs>
<TabItem label="C">
```c
int64_t xfl =
  	slot_float(amt_slot);
```


</TabItem>

<TabItem label="JavaScript">
```javascript
const xfl = slot_float(amt_slot)
```
</TabItem>
</Tabs>



### Parameters

<Tabs>
<TabItem label="C">
| Name     | Type      | Description     |
| -------- | --------- | --------------- |
| slot_no | uint32_t | The slot number |
</TabItem>

<TabItem label="JavaScript">
| Name   | Type   | Description                                        |
| ------ | ------ | -------------------------------------------------- |
| slotno | number | The slot number to retrieve the bigint value from. |
</TabItem>
</Tabs>

### Return Code

<Tabs>
<TabItem label="C">
| Type     | Description                                                                                                                                                                                                                                                                          |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| int64_t | <p>The XFL enclosing number<br /><br />If negative, an error:<br /><code>DOESNT_EXIST</code><br />- the specified slot does not contain any object or it is an invalid slot<br /><br /><code>NOT_AN_AMOUNT</code><br />- the specified slot does not contain an <code>STI_AMOUNT</code> object</p> |
</TabItem>

<TabItem label="JavaScript">
| Type                | Description                                |
| ------------------- | ------------------------------------------ |
| bigint or ErrorCode | Returns an error code or the bigint value. |
</TabItem>
</Tabs>

