How to create a simple 'TimeStamp' Class in 4D | Coding Tutorial

preview_player
Показать описание
In this video, I demonstrate how to code a simple TimeStamp class using in 4D and ORDA. I used 4D v18 R4 (which is currently in Beta) for this tutorial. Although 4D language was traditionally very different from modern Object Oriented languages, the modern 4D language (also known as ORDA: Object Relations Data Access) shares a lot of similarities with languages such as Javascript and Java. The introduction of ‘ORDA’ in v17 was a game changer, and now with the introduction of Classes in R3, we will witness a paradigm shift in 4D programming. We can now take advantage of Object-Oriented Programming concepts such as polymorphism, composition, and inheritance to write our own class libraries.

You can also use the public 4D v18 R3 to develop this class, but your variable declarations will have to follow the classic 4D syntax. For Example:
C_LONGINT ($n) instead of var $n: Integer
C_OBJECT ($1) instead of var $1: cs.Class.TimeStamp

4D is a RAD (Rapid Application Development) environment. For more information about 4D please check:
Рекомендации по теме
Комментарии
Автор

In the addToDate Function the parameters are written 'var $1, $2, $3 : Integer' how can you use comma as separator instead of semicolon?

AakeTraak
join shbcf.ru