Delphi Constant Set

Delphi Constant Set 4,5/5 2180 reviews

Hi I would like to define a 'global' constant that was visible in every unit of my application. At the moment I am doing it like this: unit Main; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ExtCtrls, StdCtrls, Splash, jpeg; const filepath = 'E: Application data '; type etc etc. Public filepath: string; ----------------------------------------------- Is this right. Twilight part 1 watch online.

  1. Delphi Define Constant Set
  2. Delphi Constant String Array
Delphi

Delphi Define Constant Set

The Graphics unit contains definitions of useful constants for TColor. These constants map either directly to the. The low three bytes represent RGB color intensities for blue, green, and red, respectively. The value $00FF0000 (Delphi) or 0x00FF0000 (C++) represents full-intensity, pure blue, $0000FF00 (Delphi) or 0x0000FF00 (C++) is pure.

Delphi Constant String Array

I obviously have to define it using CONST. I also have to make it public to be seen by the rest of the application so it needs declaring within PUBLIC as a string type. When I come to make reference to it in other parts of the application using TfmMain.filepath its not set. I then move the CONST declaration to below the IMPLEMENTATION section but its still empty when called. I know this is pretty basic but whats the correct way to do this??

Comments are closed.