From c0258845b4b1ad5d33a4143cac63faedd6f5bfbb Mon Sep 17 00:00:00 2001 From: kokos <569916@gmail.com> Date: Mon, 26 Jul 2021 15:52:33 +0200 Subject: [PATCH 1/2] Created Raw Programming Guide Create ProgrammingGuide(raw).md Inserted the section on How To Comment --- ProgrammingGuide(raw).md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ProgrammingGuide(raw).md diff --git a/ProgrammingGuide(raw).md b/ProgrammingGuide(raw).md new file mode 100644 index 0000000..a9d60cc --- /dev/null +++ b/ProgrammingGuide(raw).md @@ -0,0 +1,29 @@ +How to comment +A comment within a script explains the purpose of several lines without explicitly stating the obvious. The next developer should be able to continue the work with support of the comments. A comment example is stated (using //) below on line 1: +'''c# +1| //Hide start menu and spawn inspection mode menu +2| public void OpenInspectionMode() { +3| start.SetActive(false); +4| Instantiate(inspection); +5| } +''' + +C++ and C# use // (two-slashes) to comment a single line while Python uses # (hash sign). In case the comment spans multiple lines (block comments) in a row, both languages use the same comment syntax: +'''c# +1| /*Hide start menu and +2| spawn inspection mode +3| menu*/ +4| public void OpenInspectionMode() { +5| start.SetActive(false); +6| Instantiate(inspection); +7| } +''' + +An unclear comment example, states what already is written: +'''C# +1| //Deactivate start menu and instantiate inspection menu +2| public void OpenInspectionMode() { +3| start.SetActive(false); +4| Instantiate(inspection); +5| } +''' From decbe5462292c527c2c9a2af9676a7059229a9e5 Mon Sep 17 00:00:00 2001 From: Koen <55196772+GitKoenO@users.noreply.github.com> Date: Mon, 26 Jul 2021 16:05:27 +0200 Subject: [PATCH 2/2] Corrected Format of File Corrected Format of file --- ProgrammingGuide(raw).md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/ProgrammingGuide(raw).md b/ProgrammingGuide(raw).md index a9d60cc..f35e891 100644 --- a/ProgrammingGuide(raw).md +++ b/ProgrammingGuide(raw).md @@ -1,15 +1,23 @@ -How to comment -A comment within a script explains the purpose of several lines without explicitly stating the obvious. The next developer should be able to continue the work with support of the comments. A comment example is stated (using //) below on line 1: -'''c# + +