Added Helpers library
This commit is contained in:
24
Examples/Helpers/HL_Convert_BytesTo.hws
Normal file
24
Examples/Helpers/HL_Convert_BytesTo.hws
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
**************************************************
|
||||
*** Helpers.hws Example : HL.Convert.BytesTo() ***
|
||||
**************************************************
|
||||
*/
|
||||
|
||||
@INCLUDE "../../+Includes.hws"
|
||||
@INCLUDE #INC_HELPERS
|
||||
|
||||
NPrint("HL.Convert.BytesTo Example")
|
||||
NPrint("--------------------------\n")
|
||||
|
||||
Local bytes = 24589798800
|
||||
Local decimals = 2
|
||||
|
||||
NPrint("Converting " .. bytes .. " bytes to")
|
||||
NPrint(" Kb : " .. HL.Convert.BytesTo(bytes, #HL_KILOBYTES, decimals))
|
||||
NPrint(" Mb : " .. HL.Convert.BytesTo(bytes, #HL_MEGABYTES, decimals))
|
||||
NPrint(" Gb : " .. HL.Convert.BytesTo(bytes, #HL_GIGABYTES, decimals))
|
||||
NPrint(" Tb : " .. HL.Convert.BytesTo(bytes, #HL_TERABYTES, decimals))
|
||||
NPrint(" Auto : " .. HL.Convert.BytesTo(bytes, #HL_AUTO, decimals))
|
||||
|
||||
NPrint("\n--- Left mouse button to quit ---")
|
||||
WaitLeftMouse()
|
Reference in New Issue
Block a user