Could Anybody tell me the VBscript for
REVERSE an Integer int reverse(int num) Ex:246 to 642

Answer Posted / pankaj jaju

Function IntReverse(varNum)
Dim varTemp

If IsNumeric(varNum) = True Then
varTemp=0
While (varNum/10) > 0
varTemp = (varTemp*10) + (varNum Mod 10)
varNum = Int(varNum/10)
Wend
IntReverse = varTemp
Else
IntReverse = False
End If
End Function

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about vb script?

762


Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?

550


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

2028


How will you reverse a string in vbscript?

626


Explain about operator precedence in vb script?

586






What is the output of a + b in vbscript if a = 5 and b = 10?

2136


Give me sm ideas to write Vbscripts abt protocol testing abilash700@gmail.com.

1598


How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'

3284


How strcomp function works?

632


Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.

1422


How many types of operators are available in the vbscript language?

547


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

492


Which operator can be used to check if two numbers are equal or not in vbscript?

660


What is the event handling in vbscript?

571


Is VB Script Case sensitive or Case insensitive?

644