Let's review what you really need to know in order to start programming. Let's consider a very simple code fragment and dissect what's going on syntactically and semantically. This is a comment that extends over multiple lines and adopts C-like initiation and termination. This is a global variable accessible from all tasks. There are a maximum of eight subroutines per program.
Subroutines allow for a simple form of code reuse.
Subroutines can call functions. Here we define a task that can be stopped or started. This is a local variable accessible only in this task. Loop forever or at least until the task is stopped. This variable is local to this block.