|Newbie questions about Pliant
|Message posted by maybe Rogerio Justino on 2001/09/10 17:35:53
|I want to format the float example:
text ""+(string percent)+"%"
It returns me a nunber like that 0.697854
and I want that
what i have to do ?
|Message posted by maybe Hubert Tonneau on 2001/09/10 18:21:13
|text (string (cast percent*100 Int)/100)+"%"
|Message posted by maybe Patrice Ossona de Mendez on 2001/09/11 16:21:30
text (string (cast percent*100+.5 Int)/100)+"%"
|Message posted by maybe Hubert Tonneau on 2001/09/11 17:26:48
|No: rounding is the default Pliant behaviour (as opposed to C),
so there is no need to add 0.5