diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/arrays.md | 4 | ||||
| -rw-r--r-- | docs/booleans.md | 2 | ||||
| -rw-r--r-- | docs/integers.md | 6 | ||||
| -rw-r--r-- | docs/iterators.md | 2 | ||||
| -rw-r--r-- | docs/metamethods.md | 2 | ||||
| -rw-r--r-- | docs/moments.md | 4 | ||||
| -rw-r--r-- | docs/nums.md | 2 | ||||
| -rw-r--r-- | docs/optionals.md | 8 | ||||
| -rw-r--r-- | docs/paths.md | 4 | ||||
| -rw-r--r-- | docs/reductions.md | 2 | ||||
| -rw-r--r-- | docs/tables.md | 4 | ||||
| -rw-r--r-- | docs/text.md | 8 |
12 files changed, 24 insertions, 24 deletions
diff --git a/docs/arrays.md b/docs/arrays.md index b69ae259..c1886d43 100644 --- a/docs/arrays.md +++ b/docs/arrays.md @@ -366,7 +366,7 @@ The index of the first occurrence or `!Int` if not found. = 2 : Int? >> [10, 20, 30, 40, 50]:find(9999) -= NULL : Int? += NONE : Int? ``` --- @@ -396,7 +396,7 @@ item matches. >> [4, 5, 6]:find(func(i:&Int): i:is_prime()) = 5 : Int? >> [4, 6, 8]:find(func(i:&Int): i:is_prime()) -= NULL : Int? += NONE : Int? ``` --- diff --git a/docs/booleans.md b/docs/booleans.md index 3537e3ee..d2a22d5c 100644 --- a/docs/booleans.md +++ b/docs/booleans.md @@ -33,5 +33,5 @@ func parse(text: Text -> Bool?) >> Bool.parse("no") = no : Bool? >> Bool.parse("???") -= NULL : Bool? += NONE : Bool? ``` diff --git a/docs/integers.md b/docs/integers.md index d995d139..213aa1bd 100644 --- a/docs/integers.md +++ b/docs/integers.md @@ -171,7 +171,7 @@ 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, -`NULL` will be returned. +`NONE` will be returned. **Example:** ```tomo @@ -182,11 +182,11 @@ of the representable range or if the entire text can't be parsed as an integer, # Can't parse: >> Int.parse("asdf") -= NULL : Int? += NONE : Int? # Outside valid range: >> Int8.parse("9999999") -= NULL : Int8? += NONE : Int8? ``` --- diff --git a/docs/iterators.md b/docs/iterators.md index ee777cfe..064af9c2 100644 --- a/docs/iterators.md +++ b/docs/iterators.md @@ -22,7 +22,7 @@ successively gets one line from a file at a time until the file is exhausted: >> iter() = "line three" : Text? >> iter() -= NULL : Text? += NONE : Text? for line in (./test.txt):each_line(): pass diff --git a/docs/metamethods.md b/docs/metamethods.md index ca2ecccd..a3f73b54 100644 --- a/docs/metamethods.md +++ b/docs/metamethods.md @@ -6,7 +6,7 @@ behavior that is required for all types: - `func as_text(obj:&T?, colorize=no, type:&TypeInfo_t -> Text)`: a method to convert the type to a string. If `colorize` is `yes`, then the method should include ANSI escape codes for syntax highlighting. If the `obj` pointer is - `NULL`, a string representation of the type will be returned instead. + `NONE`, a string representation of the type will be returned instead. - `func compare(x:&T, y:&T, type:&TypeInfo_t -> Int32)`: Return an integer representing the result of comparing `x` and `y`, where negative numbers mean `x` is less diff --git a/docs/moments.md b/docs/moments.md index 6e2ac234..84b71d08 100644 --- a/docs/moments.md +++ b/docs/moments.md @@ -523,7 +523,7 @@ Returns a `Moment` object representing the current date and time. **Description:** Return a new `Moment` object parsed from the given string in the given format, -or `NULL` if the value could not be successfully parsed. +or `NONE` if the value could not be successfully parsed. **Signature:** ```tomo @@ -539,7 +539,7 @@ func parse(text: Text, format: Text = "%Y-%m-%dT%H:%M:%S%z" -> Moment?) **Returns:** If the text was successfully parsed according to the given format, return a -`Moment` representing that information. Otherwise, return `NULL`. +`Moment` representing that information. Otherwise, return `NONE`. **Example:** ```tomo diff --git a/docs/nums.md b/docs/nums.md index 0b55f71e..acf195d8 100644 --- a/docs/nums.md +++ b/docs/nums.md @@ -583,7 +583,7 @@ func parse(text: Text -> Num?) - `text`: The text containing the number. **Returns:** -The number represented by the text or `NULL` if the entire text can't be parsed +The number represented by the text or `NONE` if the entire text can't be parsed as a number. **Example:** diff --git a/docs/optionals.md b/docs/optionals.md index bb2aecfd..584625fe 100644 --- a/docs/optionals.md +++ b/docs/optionals.md @@ -63,7 +63,7 @@ x = !Int ## Type Inference -For convenience, null values can also be written as `NULL` for any type in +For convenience, null values can also be written as `NONE` for any type in situations where the compiler knows what type of optional value is expected: - When assigning to a variable that has already been declared as optional. @@ -74,12 +74,12 @@ Here are some examples: ```tomo x := 5? -x = NULL +x = NONE func doop(arg:Int?)->Text?: - return NULL + return NONE -doop(NULL) +doop(NONE) ``` Non-null values can also be automatically promoted to optional values without diff --git a/docs/paths.md b/docs/paths.md index b2dfe384..f2b44522 100644 --- a/docs/paths.md +++ b/docs/paths.md @@ -495,7 +495,7 @@ raised. = "Hello" : Text? >> (./nosuchfile.xxx):read() -= NULL : Text? += NONE : Text? ``` --- @@ -524,7 +524,7 @@ returned. = [72[B], 101[B], 108[B], 108[B], 111[B]] : [Byte]? >> (./nosuchfile.xxx):read() -= NULL : [Byte]? += NONE : [Byte]? ``` --- diff --git a/docs/reductions.md b/docs/reductions.md index 2ed6879f..d68b3886 100644 --- a/docs/reductions.md +++ b/docs/reductions.md @@ -22,7 +22,7 @@ nums := [:Int] sum := (+: nums) >> sum -= NULL : Int? += NONE : Int? >> sum or 0 = 0 diff --git a/docs/tables.md b/docs/tables.md index 6a6c7004..6cbe859c 100644 --- a/docs/tables.md +++ b/docs/tables.md @@ -50,7 +50,7 @@ was found or error if it wasn't: >> t:get("x") = 1 : Int? >> t:get("????") -= NULL : Int? += NONE : Int? >> t:get("x")! = 1 ``` @@ -190,7 +190,7 @@ The value associated with the key or null if the key is not found. = 1 : Int? >> t:get("????") -= NULL : Int? += NONE : Int? >> t:get("A")! = 1 : Int diff --git a/docs/text.md b/docs/text.md index 15b08d9c..d67f0a7b 100644 --- a/docs/text.md +++ b/docs/text.md @@ -3,7 +3,7 @@ `Text` is Tomo's datatype to represent text. The name `Text` is used instead of "string" because Tomo text represents immutable, normalized unicode data with fast indexing that has an implementation that is efficient for concatenation. -These are _not_ C-style NULL-terminated character arrays. GNU libunistring is +These are _not_ C-style NUL-terminated character arrays. GNU libunistring is used for full Unicode functionality (grapheme cluster counts, capitalization, etc.). @@ -695,9 +695,9 @@ containing information about the match. **Example:** ```tomo >> " #one #two #three ":find($/#{id}/, start=-999) -= NULL : Match? += NONE : Match? >> " #one #two #three ":find($/#{id}/, start=999) -= NULL : Match? += NONE : Match? >> " #one #two #three ":find($/#{id}/) = Match(text="#one", index=2, captures=["one"]) : Match? >> " #one #two #three ":find("{id}", start=6) @@ -887,7 +887,7 @@ or a null value otherwise. **Example:** ```tomo >> "hello world":matches($/{id}/) -= NULL : [Text]? += NONE : [Text]? >> "hello world":matches($/{id} {id}/) = ["hello", "world"] : [Text]? |
