From 0b4017d519daf4a4c3c16a912d1f6f98918374d7 Mon Sep 17 00:00:00 2001 From: skyace65 Date: Tue, 22 Feb 2022 20:34:32 -0500 Subject: [PATCH] Document line continuation in GDScript --- .../scripting/gdscript/gdscript_basics.rst | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tutorials/scripting/gdscript/gdscript_basics.rst b/tutorials/scripting/gdscript/gdscript_basics.rst index 84540e0f7..da9693d46 100644 --- a/tutorials/scripting/gdscript/gdscript_basics.rst +++ b/tutorials/scripting/gdscript/gdscript_basics.rst @@ -395,6 +395,27 @@ considered a comment. .. _doc_gdscript_builtin_types: +Line continuation +~~~~~~~~~~~~~~~~~ + +A line of code in GDScript can be continued on the next line by using a backslash +(``\``). Add one at the end of a line and the code on the next line will act like +it's where the backslash is. Here is an example: + +:: + + var a = 1 + \ + 2 + +A line can be continued multiple times like this: + +:: + + var a = 1 + \ + 4 + \ + 10 + \ + 4 + Built-in types --------------