It is a bit of a shock starting with SCL, particularly if you have little experience with computer programming. SCL is very similar to a language called Pascal, the formatting follows it very closely. SCL is best used for things that involve calculation, whereas Ladder is best for binary logic. You can't mix languages within a block, but you can within a program and then call an SCL Function from within a Ladder block or vice versa.
The picture below or attached is a small SCL program that clears some memory in a non-optimised DB.
Stuff to notice:
Comments are preceded by double forward slash.
Ends of statements are show with a semicolon (; ).
Ends of lines may not be ends of statements, so within the Poke function variables are separated by comma (, ).
Variables have a # at the beginning, but if you copy and paste the variable from somewhere else TIA will add the # for you.
If you want to store a calculated variable you start with the name of the variable (don't forget the #), followed by a colon
) then the equals (=) followed by the formula.
If you open or create an SCL block, the library on the right of the screen changes to show SCL instruction, and you can access the help for each instruction the same as for Ladder.