diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-21 13:00:53 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-21 13:00:53 -0500 |
| commit | f868d02b08688c04509d1abda5af89a182033d88 (patch) | |
| tree | af64c48127e0edfebb348edabbccbcc402d2070b /docs/integers.md | |
| parent | 90573ba7a15bb47a11c1eb6f69ed04c01b69724d (diff) | |
Add `NULL` as a syntax for null values.
Diffstat (limited to 'docs/integers.md')
| -rw-r--r-- | docs/integers.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/integers.md b/docs/integers.md index f5e6838b..d995d139 100644 --- a/docs/integers.md +++ b/docs/integers.md @@ -171,22 +171,22 @@ func parse(text: Text -> Int?) **Returns:** The integer represented by the text. If the given text contains a value outside of the representable range or if the entire text can't be parsed as an integer, -a null value will be returned. +`NULL` will be returned. **Example:** ```tomo >> Int.parse("123") -= 123? += 123 : Int? >> Int.parse("0xFF") -= 255? += 255 : Int? # Can't parse: >> Int.parse("asdf") -= !Int += NULL : Int? # Outside valid range: >> Int8.parse("9999999") -= !Int += NULL : Int8? ``` --- |
