⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unatypes.pas

📁 Voice Commnucation Components for Delphi
💻 PAS
字号:

(*
	----------------------------------------------

	  unaTypes.pas
	  Common types

	----------------------------------------------
	  This source code cannot be used without
	  proper license granted to you as a private
	  person or an entity by the Lake of Soft, Ltd

	  Visit http://lakeofsoft.com/ for more information.

	  Copyright (c) 2001, 2007 Lake of Soft, Ltd
		     All rights reserved
	----------------------------------------------

	  created by:
		Lake, 25 Aug 2001

	  modified by:
		Lake, Sep-Dec 2001
		Lake, Jan-Dec 2002
		Lake, Jan-Dec 2003
		Lake, Sep 2005
		Lake, Jan-Apr 2007

	----------------------------------------------
*)

{$I unaDef.inc }

unit
  unaTypes;

{DP:UNIT
  Contains definition of base types used in other units. Most often used types are:
  <UL>
	<LI>int = integer;</LI>
	<LI>bool = longBool;</LI>
	<LI>unsigned = cardinal;</LI>
  </UL>
}

interface

type
{$IFDEF __BEFORE_D4__ }	// before Delphi 4.0
  longword = cardinal;
{$ENDIF}

  int8		=  shortint;
  int16		= smallint;
  int32		= longint;
  //int64		= Int64;	// defined in System.pas

  uint8		= byte;
  uint16	= word;
  uint32	= longword;
  uint64	= int64;	// Delphi up to version 7 has no support for unsigned 64-bit integers
  uint64Rec	= record lo, hi: uint32; end;	//

  {$EXTERNALSYM int }
  int = integer;	// general signed integer type, 32 or 64 bits long

  {$EXTERNALSYM long }
  long = int;		// general signed integer type, 32 or 64 bits long

  {$EXTERNALSYM bool }
  bool = LongBool;	// general boolean type, 32 or 64 bits long

  pUnsigned = ^unsigned;
  {$EXTERNALSYM unsigned }
  unsigned = cardinal;	// general unsigned integer type, 32 or 64 bits long

  pInt8		= ^int8;
  pInt16	= ^int16;
  pInt32	= ^int32;
  pInt64	= ^int64;	// defined in System.pas

  pUint8	= ^uint8;
  pUint16	= ^uint16;
  pUint32	= ^uint32;
  pUint64	= ^uint64;

  //
  {$EXTERNALSYM float }
  float		= single;

  tArray = array[0 .. $7FFFFFFF - 1] of byte;
  pArray = ^tArray;

  tShortIntArray = array[0 .. $7FFFFFFF - 1] of shortInt;
  pShortIntArray = ^tShortIntArray;

  tSmallIntArray = array[0 .. $3FFFFFFF - 1] of smallInt;
  pSmallIntArray = ^tSmallIntArray;

  tInt32Array  = array[0 .. $1FFFFFFF - 1] of int32;
  pInt32Array = ^tInt32Array;

  tUint32Array  = array[0 .. $1FFFFFFF - 1] of uint32;
  pUint32Array = ^tUint32Array;

  tInt64Array  = array[0 .. $0FFFFFFF - 1] of int64;
  pInt64Array = ^tInt64Array;

  tPtrArray = array [0 .. $1FFFFFFF - 1] of pointer;
  pPtrArray = ^tPtrArray;

  tSingleArray  = array[0 .. $1FFFFFFF - 1] of single;
  pSingleArray = ^tSingleArray;

  tFloatArray  = tSingleArray;
  pFloatArray = ^tFloatArray;
  //
  tFloatArrayPArray = array[0 .. $1FFFFFFF - 1] of pFloatArray;
  pFloatArrayPArray = ^tFloatArrayPArray;

  tDoubleArray  = array[0 .. $0FFFFFFF - 1] of double;
  pDoubleArray = ^tDoubleArray;

  tExtendedArray  = array[0 .. $0CCCCCCC - 1] of extended;
  pExtendedArray = ^tExtendedArray;

const
  RT_RCDATAW = pWideChar(#10);


implementation

{$IFDEF DEBUG }
var
  b: bool;
{$ENDIF }

initialization

{$IFDEF DEBUG }
  b := (1 <> (high(tFloatArray) and $1));
  assert(b, 'unaTypes - DEBUG VERSION!');
{$ENDIF }

end.


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -