# BooleanFormat

Returns the value formatted as a boolean string

## Method Signature

```
BooleanFormat(value=[any])
```

### Arguments

| Argument | Type  | Required | Description                                                | Default |
| -------- | ----- | -------- | ---------------------------------------------------------- | ------- |
| `value`  | `any` | `true`   | The value to cast as a boolean and return the string value |         |

## Examples

### 1 is definitely true

[Run Example](https://try.boxlang.io/?code=eJxLys%2FPSU3Mc8svyk0s0VAwVNC05gIATjEGUQ%3D%3D)

```java
booleanFormat( 1 );

```

Result: true

### 0 is definitely false

[Run Example](https://try.boxlang.io/?code=eJxLys%2FPSU3Mc8svyk0s0VAwUNC05gIATiwGUA%3D%3D)

```java
booleanFormat( 0 );

```

Result: false

### Negative -1 is true as well

[Run Example](https://try.boxlang.io/?code=eJxLys%2FPSU3Mc8svyk0s0VDQNVTQtOYCAFTRBn4%3D)

```java
booleanFormat( -1 );

```

Result: true

### And even a number larger then 1 is true

[Run Example](https://try.boxlang.io/?code=eJxLys%2FPSU3Mc8svyk0s0VAwVdC05gIATkUGVQ%3D%3D)

```java
booleanFormat( 5 );

```

Result: true

### Additional Examples

[Run Example](https://try.boxlang.io/?code=eJwrL8osSXUpzS3QUHDKz89JTcxzyy%2FKTSzRUDA0MlbQVNC0VtDXVwgpKk3lKsep1ACskAuk0i0xpziVCwC7Nho6)

```java
writeDump( BooleanFormat( 123 ) ); // True
writeDump( BooleanFormat( 0 ) );
 // False

```

## Related

* [DecimalFormat](/boxlang-language/reference/built-in-functions/format/decimalformat.md)
* [LSNumberFormat](/boxlang-language/reference/built-in-functions/format/lsnumberformat.md)
* [NumberFormat](/boxlang-language/reference/built-in-functions/format/numberformat.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/format/booleanformat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
