-
Hello, i am in need to find a list of terms and what not for string functions for instance:
I am reading this book and he doesn't even explain what this does and it really confuses me when i have to try and figure out what the heck he is talking about but like this:
Code:
Public Function Postage(Weight as Single) as Curency
If Int(Weight) = Weight Then
Postage = 0.32 + (0.23 * (Weight - 1))
Else
Postage = 0.32 + (0.23 * (Int(Weight)))
End if
ENd fucntion
See i don't understand what just happened there can someone explain?
and in other situations also, i don't understand what Int is doing or Str is doing or anyt of that, does anyone have any sites that list so i may learn them? Thanks for listening :D
I'm gessing Int makes whatever is in weight a integer but i'm not quite sure
-
The MSDN Library is also online and can be searched at
http://search.microsoft.com/us/dev/default.asp
Int() returns the integer portion of an expression. If weight was 11.4 it would return 11 but if weight was 11 it would also return 11 and the If statement would be true.
Str() is usefull for converting a numeric expression to a string, most usefull when outputing numeric data concatenated with string data.