© Casey Hardman  2020
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-5656-5_7

7. Code Blocks and Methods

Casey Hardman1 
(1)
West Palm Beach, FL, USA
 

We’re about to go over some universal rules of code syntax to learn the structure of code files and to understand some fundamental terms and concepts.

Statements and Semicolons

The term statement refers to what is essentially a single instruction of code. Different sorts of statements exist to do different things.

A statement will end in a semicolon “;”. This tells the computer where one statement ends and the next is to begin. Some languages don’t use semicolons at all and instead allow the end of a line to signify the end of a statement. The advantage of using semicolons ...

Get Game Programming with Unity and C#: A Complete Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.