Pointer to a Currency value System unit
  type PCurrency = ^Currency;
The PCurrency type is a pointer to a Currency value.
Pointer arithmetic, such as Inc, Dec can be used on it, for example to navigate a block of Currency values, as in the example.
Related commands
Currency A decimal type with 4 decimal points used for financial values
Dec Decrement an ordinal variable
Inc Increment an ordinal variable
 Author links

 Buy Website Traffic at

 Buy Proxies at
 Download this web site as a Windows program.

Example code : Store 3 Currency values in memory and navigate through them
  currPtr : PCurrency;

  // Allocate storage for three currency variables
  GetMem(currPtr, 3 * SizeOf(Currency));

  // Fill out these currency variables
  currPtr^ := 123.45;
  currPtr^ := 2.9;
  currPtr^ := 87654321;

  // Now display these values
  Dec(currPtr, 2);
  ShowMessageFmt('Currency 1 = %m',[currPtr^]);
  ShowMessageFmt('Currency 2 = %m',[currPtr^]);
  ShowMessageFmt('Currency 3 = %m',[currPtr^]);
Show full unit code
   Currency 1 = ?123.45
   Currency 2 = ?2.90
   Currency 3 = ?87,654,321.00
Delphi Programming Neil Moffatt 2002 - 2018. All rights reserved.  |  Home Page