Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Specifications/Language/3_Expressions/ValueLiterals.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ Value literals for the [`Int` type](https://github.com/microsoft/qsharp-language

## BigInt Literals

Value literals for the [`BigInt` type](https://github.com/microsoft/qsharp-language/tree/main/Specifications/Language/4_TypeSystem#available-types) are always postfixed with `L` and can be expressed in decimal or hexadecimal representation. Literals expressed in hexadecimal are prefixed with `0x`. There is no prefix for the commonly used decimal representation.
Value literals for the [`BigInt` type](https://github.com/microsoft/qsharp-language/tree/main/Specifications/Language/4_TypeSystem#available-types) are always postfixed with `L` and can be expressed in binary, octal, decimal, or hexadecimal representation. Literals expressed in binary are prefixed with `0b`, with `0o` for octal, and with `0x` for hexadecimal. There is no prefix for the commonly used decimal representation.

| Representation | Value Literal |
| --- | --- |
| Binary | `0b101010L` |
| Octal | `0o52L` |
| Decimal | `42L` |
| Hexadecimal | `0x2aL` |

Expand Down