How to open a document in Free Pascal/Lazarus
To open a document file using it’s default application use OpenDocument function that exists in LCLIntf unit:
To open a document file using it’s default application use OpenDocument function that exists in LCLIntf unit:
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).…
If you want to call a procedure/function with variables and you want that procedure/function to modify parameters value, add var keyword in procedure/function parameter declaration: This type of passing parameters is called calling by reference it requires a variable with the same exact type to by passed and it will not work if a constant…
You can use Now function to retreive current date and time from computer. Sample: Make sure you have included sysutils unit in uses clause. You can use FormatDateTime function to format date and time: