New language additions in Free Pascal

These are many new improvements of Object Pascal programming language in Free Pascal compiler. I don’t know how much new are they, but at least they are new since Delphi 7 language. I haven’t used any of these features before (until now) because I wasn’t know about them. 1. For .. in loop: This can…

Object Oriented Programming in Free Pascal

Free Pascal supports Object Oriened programming paradigm as well as structured programming, so that it is a multi paradigm language. In this example we will define TCar as a class (type). This class contains attributes (variables) and methods (procedures and functions). Before using this class, we need to declare and inistantiate objects (variables of class).…

How to copy files in Free Pascal

To copy files in Free Pascal, you can do it in many ways, one of them is to use TStreamFile‘s CopyFrom method. This example could copy any type of files without changing it’s contents. But destination file information will be changed, like file name, and updated time.