Just starting out? Need help? Post your questions and find answers here.
-
bingo
- Enthusiast

- Posts: 210
- Joined: Fri Apr 02, 2004 12:21 pm
- Location: germany/thueringen
-
Contact:
Post
by bingo »
no problem with long:
Code: Select all
size.l = 99999
i.l = 999
percent.f
percent = (i/size) * 100
Debug percent
but how can i use this with BIG quads ? :roll:
Code: Select all
size.q = 9999999999999999999
i.q = 999999999
percent.f
percent = (i/size) * 100
Debug percent ;?
["1:0>1"]
-
blueznl
- PureBasic Expert

- Posts: 6166
- Joined: Sat May 17, 2003 11:31 am
-
Contact:
Post
by blueznl »
Does this help?
or perhaps...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here... )
-
bingo
- Enthusiast

- Posts: 210
- Joined: Fri Apr 02, 2004 12:21 pm
- Location: germany/thueringen
-
Contact:
Post
by bingo »
no.
http://msdn.microsoft.com/en-us/library ... S.85).aspx
An application can use this information to display a progress bar that shows the total number of bytes copied as a
percent of the total file size.
but it is not useful for big files.
["1:0>1"]
-
Trond
- Always Here

- Posts: 7446
- Joined: Mon Sep 22, 2003 6:45 pm
- Location: Norway
Post
by Trond »
Your main problem is that the value you put into size is larger than what a quad can store, so it overflows.
Max quad: +9223372036854775807
Your num: +9999999999999999999
-
Fluid Byte
- Addict

- Posts: 2336
- Joined: Fri Jul 21, 2006 4:41 am
- Location: Berlin, Germany
Post
by Fluid Byte »
There are no files that big. Why do you need this?
-
blueznl
- PureBasic Expert

- Posts: 6166
- Joined: Sat May 17, 2003 11:31 am
-
Contact:
Post
by blueznl »
Bingo, turn everything into .d's and it will work. Indeed the question is: are you going out of bounds on quads?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here... )
-
bingo
- Enthusiast

- Posts: 210
- Joined: Fri Apr 02, 2004 12:21 pm
- Location: germany/thueringen
-
Contact:
Post
by bingo »
thanks.
it works with:
Code: Select all
TotalFileSize.q
tf.d = TotalFileSize
["1:0>1"]
-
blueznl
- PureBasic Expert

- Posts: 6166
- Joined: Sat May 17, 2003 11:31 am
-
Contact:
Post
by blueznl »
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here... )