Skip to content

Commit

Permalink
CalculateSIZE in MB fixes (Testing)
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Aug 6, 2014
1 parent 50c949e commit 55a180e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions I-Nex/i-nex/.src/Disk_Drives.module
Original file line number Diff line number Diff line change
Expand Up @@ -244,23 +244,21 @@ Function CalculateSIZE(BlockSize As Float, Optional ReturnIn As Boolean) As Stri
Dim REAL_SIZE_MB As Float
Dim REAL_SIZE_GB As Float
Dim iPos As Integer
REAL_SIZE_BYTES = (BlockSize * 512)
REAL_SIZE_KIB = (BlockSize / 2)
REAL_SIZE_MB = (BlockSize / 2 / 1024)
REAL_SIZE_GB = (BlockSize / 2 / 1024 / 1024)
Inc iPos
REAL_SIZE_MB = (BlockSize / 2 / 1024)
REAL_SIZE_KIB = (BlockSize / 2)
REAL_SIZE_BYTES = (BlockSize * 512)

If CLong(REAL_SIZE_GB) > 0 Then

iPos = InStr(CString(REAL_SIZE_GB), ".")
If ReturnIn = True Then
Return Left$(CString(REAL_SIZE_GB), iPos + 1) & Space$(1) & "GB"
Else
Return REAL_SIZE_BYTES
Endif
Else If CLong(REAL_SIZE_MB) > 0 Then
iPos = InStr(CString(REAL_SIZE_MB), ".")
If ReturnIn = True Then
Return Left$(CString(REAL_SIZE_MB), iPos + 1) & Space$(1) & "MB"
Return CLong(REAL_SIZE_MB) & Space$(1) & "MB"
Else
Return REAL_SIZE_BYTES
Endif
Expand All @@ -279,7 +277,7 @@ Function CalculateSIZE(BlockSize As Float, Optional ReturnIn As Boolean) As Stri
Return REAL_SIZE_BYTES
Endif
Endif
Dec iPos

End

Public Sub disks()
Expand Down

0 comments on commit 55a180e

Please sign in to comment.