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

how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me

1426


What are the naming conventions while declaring a variable in the vbscript language?

702


Explain the constants in vbscript?

638


Which in-built function related to an array joins substrings into one string in the vbscript language?

605


What are the differences between sub procedures and function procedures?

610






i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me

1898


Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?

1643


Is VB Script Case sensitive or Case insensitive?

734


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

2549


Out of the different type of operators, which are evaluated first and last in the vbscript language?

666


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

613


Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.

1668


What is select case statement?

696


Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?

604


How can you create a file object to work with the files in the vbscript language?

593