What is VAL function?

 Posted by Bhakti on 12/24/2009 | Category: VB.NET Interview questions | Views: 7948
Answer:

This function is used to return integer part contained in the string argument.
It stops reading further as soon as first invalid character is recognized.
Valid characters for this function are: Blanks, tabs, and linefeed characters,
radix prefixes &O (for octal) and &H (for hexadecimal) and period(.)

test = Val(" 1 2 3         4") ' Returns 1234

test = Val("1 cannot be 2") 'Returns 1


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response