Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Constant - TB in b (https://www.delphipraxis.net/172422-constant-tb-b.html)

WojTec 2. Jan 2013 19:57

Delphi-Version: 2010

Constant - TB in b
 
Delphi-Quellcode:
_tb_: Int64 = 1024 * 1024 * 1024 * 1024;
_tb_: Extended = 1024 * 1024 * 1024 * 1024;
Zitat:

[Pascal Error] MainFrm.pas(299): E2099 Overflow in conversion or arithmetic operation
How I can store TB value?

Volker Z. 2. Jan 2013 20:27

AW: Constant - TB in b
 
Hello,

you could try this:

Delphi-Quellcode:
const
  _tb_ : Int64 = Int64(1024) * Int64(1024) * Int64(1024) * Int64(1024);
  _tb_ : Extended = 1024.0 * 1024.0 * 1024.0 * 1024.0;
It should work.

Uwe Raabe 2. Jan 2013 20:28

AW: Constant - TB in b
 
Delphi-Quellcode:
_tb_: Int64 = Int64(1024) * 1024 * 1024 * 1024;
Edit: Zu spät...

WojTec 2. Jan 2013 21:21

Re: Constant - TB in b
 
Thanks :)

uligerhardt 3. Jan 2013 06:55

AW: Constant - TB in b
 
Does an untyped constant work?
Delphi-Quellcode:
const
  _tb_ = 1024 * 1024 * 1024 * 1024;


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:14 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz