Hi, Anybody could tell me What is the script for Reverse of
Given number. Ex:236--632. Thanks in Advance..

Answer Posted / parvez

'You can reverse any string with char, num and spl
characters with this code!

Sub StinrgReverse()

Dim sString, sRevString

sString = InputBox("Enter your string: ")
MsgBox sString
sRevString = fStringReverse(sString)
MsgBox sRevString
End Sub

Function fStringReverse(ByVal sBeforeRev)

Dim aStrSplit, sAfterSplit, sAfterRev, aStrRev

iLength = Len(sBeforeRev) - 1
ReDim aStrSplit(iLength) 'Very Important

For i = 0 To iLength
aStrSplit(i) = Mid(sBeforeRev, i + 1, 1)
Next

ReDim aStrRev(iLength) 'Very Important
For j = 0 To iLength
aStrRev(j) = aStrSplit(iLength - j)
Next

sAfterSplit = Join(aStrSplit, ".")
sAfterRev = Join(aStrRev, ".")
sAfterRev = Replace(sAfterRev, ".", "")
fStringReverse = sAfterRev

End Function

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to increase the values in text box in a given text box increament by two values by clicking on button

1641


Explain about tristate constants in vbscript?

614


Mention the rules for using option explicit statement?

482


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

618


How to open browser in vb script?

582






What is the use of the date function in the vbscript language?

562


who will create the object?

1481


Which keyword is used to declare a variable in the vbscript language?

529


How to assign a date value to a variable?

590


How to replace junk code recorded by QTP with a mall function.

1646


Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...

1651


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 ?

1550


Which function allows you to instantiate an object given its programmatic identifier or progid?

560


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

522


What are class properties?

651