[Gambas-user] Rounding to 2 decimals

rocko sunblaster5 at ...626...
Fri Jul 27 01:31:09 CEST 2012


Trying to get my result to just 2 decimal places using the 'Round"
function but it' not working for me.
This code gives a result of 0% ???

Code:
  Dim prmAmnt As Integer
  Dim totAmnt As Integer
  Dim perAmnt As Single
  
  prmAmnt = prmBox.Text
  totAmnt = totBox.Text
  perAmnt = Round((prmAmnt / totAmnt * 100), 2)
  
  TextLabel1.Text = perAmnt & "%"






More information about the User mailing list