---
title: "fileReadByte"
canonical: "https://support.appfire.com/space/PSCONF/15305502/fileReadByte"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | fileReadByte(fid) | **Package** | file |
> | **Alias** |  | **Pkg Usage** | readByte(fid) |

## Description

> Macro (excerpt)
> 
> Reads a byte from an open file.

Reads a byte from an open file.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | fid | String | Yes | The id of the open file to read from. |

## Return Type

**Byte**

## Error Handling

Throws **String**


 Error: "read_error": followed by the error message if the read fails
 


## Example

### Example 1

```javascript
use "file";
int fid = fileOpen("C:\myData.dat");
runnerLog(fileReadByte(fid));
close(fid);
```

Returns: 61

## See also

> Macro (contentbylabel)