diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index c192cee1fe8..60c744f398a 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -8,11 +8,11 @@ [b]Example:[/b] [codeblock] var array = ["One", 2, 3, "Four"] - print(array[0]) # One - print(array[2]) # 3 - print(array[-1]) # Four + print(array[0]) # One. + print(array[2]) # 3. + print(array[-1]) # Four. array[2] = "Three" - print(array[-2]) # Three + print(array[-2]) # Three. [/codeblock] Arrays are always passed by reference. @@ -342,7 +342,7 @@ var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] my_items.sort_custom(MyCustomSorter, "sort_ascending") - print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]] + print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]]. [/codeblock] diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 1d4225542ad..8820cb5c273 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -18,11 +18,11 @@ Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. See also [method @GDScript.ColorN]. [codeblock] - # Each of the following creates the same color RGBA(178, 217, 10, 255) - var c1 = Color("#ffb2d90a") # ARGB format with "#" - var c2 = Color("ffb2d90a") # ARGB format - var c3 = Color("#b2d90a") # RGB format with "#" - var c4 = Color("b2d90a") # RGB format + # Each of the following creates the same color RGBA(178, 217, 10, 255). + var c1 = Color("#ffb2d90a") # ARGB format with "#". + var c2 = Color("ffb2d90a") # ARGB format. + var c3 = Color("#b2d90a") # RGB format with "#". + var c4 = Color("b2d90a") # RGB format. [/codeblock] diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index facf2d1025f..29547a67f42 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -32,7 +32,7 @@ To add a key to an existing dictionary, access it like an existing key and assign to it: [codeblock] var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} - var points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. + var points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. [/codeblock] Finally, dictionaries can contain different types of keys and values in the same dictionary: [codeblock] diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 8463db9cd55..324f6db9b81 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -78,9 +78,9 @@ Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end. [codeblock] text = "Welcome" - select() # Will select "Welcome" - select(4) # Will select "ome" - select(2, 5) # Will select "lco" + select() # Will select "Welcome". + select(4) # Will select "ome". + select(2, 5) # Will select "lco". [/codeblock] diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index d063bd81e7f..1cf6dfb83fd 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -12,8 +12,8 @@ Property membership can be tested directly in GDScript using [code]in[/code]: [codeblock] var n = Node2D.new() - print("position" in n) # Prints "True". - print("other_property" in n) # Prints "False". + print("position" in n) # Prints "True". + print("other_property" in n) # Prints "False". [/codeblock] Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification]. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 3deed63ae7b..6724c3bcebd 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -315,7 +315,7 @@ [codeblock] var result = search(key, flags, line, column) if result.size() > 0: - # result found + # Result found. var res_line = result[TextEdit.SEARCH_RESULT_LINE] var res_column = result[TextEdit.SEARCH_RESULT_COLUMN] [/codeblock] diff --git a/doc/classes/int.xml b/doc/classes/int.xml index dad0f0d8c08..39017f71197 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -8,16 +8,16 @@ It can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. [int] is a [Variant] type, and will thus be used when assigning an integer value to a [Variant]. It can also be enforced with the [code]: int[/code] type hint. [codeblock] - var my_variant = 0 # int, value 0 - my_variant += 4.2 # float, value 4.2 - var my_int: int = 1 # int, value 1 - my_int = 4.2 # int, value 4, the right value is implicitly cast to int - my_int = int("6.7") # int, value 6, the String is explicitly cast with [method int] + var my_variant = 0 # int, value 0. + my_variant += 4.2 # float, value 4.2. + var my_int: int = 1 # int, value 1. + my_int = 4.2 # int, value 4, the right value is implicitly cast to int. + my_int = int("6.7") # int, value 6, the String is explicitly cast with int. var max_int = 9223372036854775807 - print(max_int) # 9223372036854775807, OK + print(max_int) # 9223372036854775807, OK. max_int += 1 - print(max_int) # -9223372036854775808, we overflowed and wrapped around + print(max_int) # -9223372036854775808, we overflowed and wrapped around. [/codeblock]