954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

[HELP] textbox string formatting

Im a beginner..

What i want to do is converting user textbox input into Float value.
Okay to the point
-----

I have textbox with 3 inputlimit

I want if user input '200' itll give result to 2.00 (floatvalue), and if user input '12.3' the result will be 0.123 (floatvalue)

im still exploring FormatFloat, trim, delete, Format, with no luck.
So someone could help me ?

crapped
Newbie Poster
3 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

Try StrToFloat() , then divide by 100.

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874
 

big thanks!... its work with standart editbox but not with Jvedit..

now my last question, how to display it using formatfloat ? format ?,

example: the value from memory is (0.50000)(2.0000) i want it to display it like this "50%" "200%"
i have tried using formatfloat n format i still cant get rid of leading zero and the dot ".50%"

crapped
Newbie Poster
3 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

True. Multiply by 100 first.

pritaeas
Posting Expert
Moderator
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: