More good things about Embarcadero C++ and Delphi Community Edition.

I mentioned the release of the free version of the Embarcadero C++ or Delphi development environment back on 19th July 2018.

This version is free to most people who make litte or no money from s/w development. There are full details of the precise license restrictions at the download links at the bottom of this posting.

This has gone down very well with hobbyists and open source enthusiasts and also allows “start up” companies to get going with a professional s/w development IDE and only have to pay when they start to make some genuine income.

Since it’s release two other advantages have occured to me.

a) Customers who are worried about ongoing support their software that I have supplied, should my company suddenly collapse (or be taken over) can now get hold of a genuine copy of community edition and can prove to themselves that the source code package I am supplying can actually be compiled and linked by someone else. I’ve always known this but now they can check for themselves. [This only applies to customers who are not in the software development business of course, but this applies to all of my company’s customers (that’s why they use my company)].

b) Anyone applying for a job at my company can now be asked to get a copy of Community Edition and be asked to develop or debug code using their copy as part of our interveiw/selection process.

Community Edition is great: Here are the links, if you are new to Embarcadero products go get it now!

C++ Builder Community Edition

Delphi (object pascal) Community Edition

Advertisements

Embarcadero release updated product “road map”

Embarcadero continue to add innovative features to their RAD Studio (C++ Builder and Delphi) product. They have just released an updated product road map which shows their plans for the rest of 2018 and the start of 2019.

 The introduction of C++ 17 support and the improved support for high DPI screens are two of the many features mentioned.

 For full details of the road map go to

Road map (Aug 2018)

For convenience we reproduce a copy of the road map here:

EmbarcaderoRoadMapAug2018

Embarcadero release free C++ and Delphi IDE for students, home users and open source.

Embarcadero have anounced new editions of their C++ IDE and Delphi IDE. Known as “Community Edition” these are free licensed versions of the “Professional edition” for students, home users, open source developers and anyone who programs but does not generate an income. There are accurate details of the restrictions on use at the links below.

 This is a very positive move by Embarcadero. It makes it easy for anyone to experience first hand the quality of their products. It can’t help but increase the popularity of the Embarcadero C++ and Delphi programming environments.

 Here are the links, if you are new to Embarcadero products go get it now!

 C++ Community Edition

Delphi (object pascal) Community Edition

Error codes from functions

Many functions in third party libraries, APIs or in your own code often return some kind of error indication as to the success or otherwise of the function call.

Always check errors when a library (or other) function returns an error (even if you are going to ignore it !).

Why do we make this statement? For all the following reasons.

a) It documents in your source code the fact that the function returns an error (you may decide to check this later).

b) It makes it easier to check the error status when you are debugging your code as/when it doesn’t work.

c) It makes it easier to add error checking at a later date.

d) It encourages you to think “should I be really ignoring the error code returned by a function” at the time that you write your code. In most cases the answer to this question is probably “no”. Checking errors almost always adds little to code complexity and often saves time in the long run.

 

A C++ Software Development Tip – * = multiply and pointer

When developing C++ code it is very common to declare a pointer to a variable of a specific type (either as a local variable, a class member or (hopefully more rarely) a global variable.

Consider the following two exactly equivalent lines

TMyType *Variable; // no space between the * and the variable – *** preferred ***

TMyType * Variable; // space between the * and the variable

Similarly when using the value pointed to (dereferencing) consider the following two exactly equivalent lines

TMyType X = *Variable; // no space between the * and the variable – *** preferred ***

TMyType X = * Variable; // space between the * and the variable

In each case we prefer the first of the two lines. Why? because the second form looks too much like the multiply operator (z = x * y).

It is very important to be consistent throughout all your code. Knowing that we always use the first form allows us to use a search on “*Variable” and find ALL the instances where the pointer is dereferenced.

 

Embarcadro RAD Studio News – Tokyo Release 3 (version 10.2.3) now out !

 

Embarcadero have announced release 3 of 10.2 Tokyo (i.e. 10.2.3).

 A summary of the new features is given at

Announcement of 10.2.3

 The C++ Rename Refactoring has been in the pipeline for a while now. It’s great that it is finally here!

 There’s also more in depth information at 

 Embarcadero Tokyo Release 3 DocWiki

 

Exciting RAD Studio Developments in 2018

Embarcadero have announced some information about Release 3 of 10.2 Tokyo (i.e. 10.2.3). This release is targeted for the first quarter of 2018.

 For this release they have three key themes. First, to provide enhancements to the core visual frameworks, including better HighDPI support for VCL and quality improvements for FireMonkey (FMX). Second, they are continuing to improve the C++ capabilities, by including CMake command line support and C++ Rename Refactoring. Third, they are expanding RAD Server support for Ext JS.

 We will keep you posted about when this release becomes available.

A tip for using Firemonkey and VCL on different Embarcadero C++ projects

I use Embarcadero C++ for a lot of work. Sometimes Firemonkey is the right framework to use and sometimes VCL is. I have a lot of C++ files that contain classes that are equally useful for both frameworks.

 Instead of having

 #include <fmx.h>

 or

 #include <vcl.h>

at the tops of the files, for all *.cpp files that can be applied equally in either framework, I use the following line:

#include “EmbarcaderoComponentLibrary.h”

The file EmbarcaderoComponentLibrary.h resides in every project I create and is edited once at the start of the project design. It contains the following lines (along with a load of comment statement which I don’t reproduce):

//*****************************************************************

//Set these for each project requirements

#define ROGER_USE_VCL 1

#define ROGER_USE_FMX 0

//******************************************************************/

#ifndef EMBARCADEROCOMPONENTLIBRARY_H

#define EMBARCADEROCOMPONENTLIBRARY_H

#if ROGER_USE_VCL

#include <vcl.h>

 #endif

 #if ROGER_USE_FMX

 #include <fmx.h>

 #endif

 #endif

 //*****************************************************************

 

Embarcadero C++ Version 2.2.2 is now available

Embarcadero have released their latest version of RAD Studio / C++ / Delphi this week – calling it Tokyo 2.2.2.

One of the new helpful improvements is the addition of a “dark theme” option in the IDE. Many professional developers will be grateful for the reduced eye strain using the IDE configured in this way affords.

 You can find a full list of the new features available at

 V2.2.2 Information about new features

You can download a copy of the starter edition (FOC) at

Embarcadero RAD Studio – Starter edition

 

Embarcadero FireDAC and C++ – Good for Paradox

FireDAC is good for paradox (a leading database in it’s time and still in use in legacy applications)…..

 

1) Create a new VCL project

 2) on Form1 add a single TFDConnection

 3) double click on this TFDConnection

 4) Select DriveID to be “ODBC”

 5) Now in the ODBC Driver entry, can you select “MS Driver for Paradox” ?

6) Assuming you can, enter the full path to your Paradox database directory in the “Database” box

 7) close down the configuration window

 8) go to the properties of the TFDConnection

9) click on “Connected” – this will bring up a password dialog (on our test I have no password protection so just click on OK). The connected check box in the properties should now say “true”.

 10) Now you can add a TFDQuery to your form

 11) It will have the property: connection already set to your TFDConnection

 12) Double click on the TFDQuery to bring up the query editor

 13) in the SQL tab enter the following

   SELECT * FROM yourtablename

 14) click on Execute and you will see all the contents of the table.

 I have just done this with a paradox database on a Win 7 PC using C++ Builder and it all works as described.

 Note: you may want to use the connection wizard (button on the TFDConnection configuration form) as this also sets up ODBC Advanced string which has additional options that can apply to FireDAC ODBC Paradox.

 Hope this helps get you started.