Notice that all of the actual examples end up looking the same?
That is the point of using the sudo language, so that we can discuss the core concepts of the lesson
at hand and then those concepts can be directly applied to any language of choice.
Notice that all of the actual examples end up looking about the same? This is the point of using the sudo language. This way I can discuss the core concepts of the lesson at hand and then those concepts can be directly applied to any language of your choice.
\par
\par
Also, notice the Python implementation, it is almost line for line, word for word identical to the sudo language example.
Also, notice the Python implementation, it is almost line for line, word for word identical to the sudo language example. If you would like to choose a language closest to the sudo language, choose Python.
\subsection{Example 2}
\subsection{Example 2}
Since we have seen a fairly simple example above, lets take a look at a more complicated example.
Now that we have looked at a fairly simple example above, lets take a look at a more complicated example.
Do not be afraid if it does not make too much sense right now, but try and notice the similarities
Do not be afraid if it does not make too much sense right now, but try and notice the similarities
between the sudo language and the actual code examples.
between the sudo language and the actual code examples.
@ -259,11 +255,10 @@ else:
\end{lstlisting}
\end{lstlisting}
This example does a better job of showing how each language can tackle the concepts in a different manner but the core concepts
This example does a better job of showing how each language can tackle the concepts in a different manner but the core concepts
laid out by the sudo language can still be extrapolated and translated to each individual programming language.
As long as the language supports the concepts.
As you may notice that I left out the implementation of C in this example.
It is because C does not support the use of classes and objects, yes there are ways of completing this example in C using structs but that
laid out by the sudo language can still be extrapolated and translated to each individual programming language; as long as the language supports the concepts.
You may notice that I left out the implementation of C in this example.
This is intentionally done because C does not support the use of classes and objects. There are ways of completing this example in C using structs but that
is something that you should learn on your own.
is something that you should learn on your own.
\par
\par
So now you have seen a few examples, hopefully enough to give you an idea of how the examples in this resource will be presented.
Hopefully the above examples will give you an understanding of how the rest of the examples in the book will be laid out.