Thank you
VBScript
Started by
boytheracer
, Aug 20 2006 03:09 AM
#1
Posted 20 August 2006 - 03:09 AM
Thank you
#2
Posted 21 August 2006 - 07:36 AM
I don't know a LOT about VBscript (I've only used it once or twice), but if you post your questions I'll see if I can help any...
#3
Posted 23 August 2006 - 10:32 AM
Write a function, named tetTitle, to test whethera string is either Mr,Mrs or Miss. The string should be passed tp testTitles and the function should be returmed a Boolean value
thank you
thank you
#4
Posted 23 August 2006 - 02:12 PM
Hi boytheracer,
I tried to write a backbone for your testTitle function. Not sure if it works, but try it.
Hope it is self explanatory
I tried to write a backbone for your testTitle function. Not sure if it works, but try it.
Public Function testTitle(name As String) Dim secondLetter As String, thirdLetter as String secondLetter = Mid(name, 2, 1) If secondLetter = "i" Or secondLetter = "s" Then 'name belongs to a Miss (or Ms) ElseIf secondLetter = "r" Then 'either Mr or Mrs, further test thirdLetter = Mid(name, 3, 1) If thirdLetter = "s" Then 'name belongs to a Mrs Else 'name belongs to a Mr End If End if End Function
Hope it is self explanatory
Edited by Hai Mac, 23 August 2006 - 02:12 PM.
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users