yes by 100 if you want, more than 1 way to skin an onion ... of course am doing this code quick going by the OP 0.5, didn't see the progress bar in OP but loading screen progress bars are simple enough:
of course, the choice is yours.
// Project: float2int
// Created: 2019-08-27
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "float2int" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
f as float
f= 0.5
i as integer
i = f*100
print (i)
s as string
s=str(f*100,0)
fval as float
fval = valfloat(s)/100
s2 as string
s2= str(fval,1)
do
Print( ScreenFPS() )
print (i)
print (s)
print (f)
print (fval)
print (s2)
Sync()
loop
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others