herewasplato Posted June 5, 2005 Posted June 5, 2005 I thought that you might be going for some of that "smoothing" I mentioned earlier. The output of StringLeft (SL) and the StringFormat (SF) are pretty much the same in this application... but SL actually has one advantage as I'll try to show below:original SL SF 15.2 15 15 15.4 15 15 15.6 15 16 15.8 15 16 16.2 16 16 16.4 16 16 16.6 16 17 16.8 16 17 17.2 17 17 17.4 17 17So the output is about the same, just changes the last digit at different places. However, think about what happens around 0.2 thru 0.8. If you use SL, you stay at 0% a bit longer and hence may have a "more stable" number to display. If you average the time_elapsed, then you might have more loops to average before you leave 0%. It is a minor gain for the speed sacrifice... but that is the only reason that I could think of as to why you wanted to use more code than SF. I did not think about "goin' with what you know". I've certainly done that a time or two. later [size="1"][font="Arial"].[u].[/u][/font][/size]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now