Modern Pascal Samples
Modern Pascal is a hybrid of the Object Pascal language, with some extensions found in Free Pascal and Delphi. Our primary focus was to expand the boundaries to allow Pascal programmers to leverage existing C source code with minimal code changes. Of course, different C compilers and developers can use syntax which are extremely proprietary, for example, the over-usage of C compiler's support for macros.
Lesson |
Description |
First Program |
Your first program - display Hello World on screen. |
If Then |
Did the user press the ENTER key?
|
If Then Else |
What to do if the user did not press ENTER? |
If Then Else If |
If Y or y then, else If N or n was pressed. |
If Then Else If Else |
If Y or y then, else If N or n, else not what I asked for was pressed. |
Adding Code Blocks |
Adding Begin and End to the last lesson, to do more than one instruction. |
Lesson |
Description |
Case |
Use Case instead of multiple "if" statements. |
For In |
Iterate through the elements of any type
|
For |
Demonstrate how to implement FOR loops |
Integers |
Demonstrate all of the different integer types |
Strings |
Demonstrate many of the string types |
Shortint |
-128 |