# could any help me to say what does this function does

Page 1 of 1

## 4 Replies - 611 Views - Last Post: 10 June 2013 - 08:29 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=322635&amp;s=bc0b9d2e232632ec3bbdb6ac8715b072&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 lazy.boss

• New D.I.C Head

Reputation: 0
• Posts: 3
• Joined: 08-June 13

# could any help me to say what does this function does

Posted 08 June 2013 - 12:37 AM

```Public Function GetIt(Code As String)
Dim X As String
Dim Y As String
X = Code
If X = "429" Or X = "22" Or X = "21" Or X = "20" Or X = "19" Or X = "18" Or X = "17" Or X = "435" Or X = "431" Then Y = "22"
If X = "1" Or X = "2" Or X = "3" Or X = "4" Or X = "5" Then Y = "23"
If X = "79" Or X = "80" Or X = "81" Or X = "449" Or X = "451" Then Y = "24"
If X = "74" Or X = "75" Or X = "132" Or X = "133" Or X = "134" Or X = "136" Or X = "138" Or X = "140" Or X = "68" Or X = "69" Or X = "70" Or X = "71" Or X = "72" Or X = "73" Then Y = "25"
If X = "76" Or X = "77" Or X = "78" Or X = "443" Or X = "445" Then Y = "26"
If X = "89" Or X = "90" Or X = "97" Or X = "98" Then Y = "9"
If X = "82" Or X = "83" Or X = "222" Or X = "224" Then Y = "13"
If X = "93" Or X = "94" Or X = "95" Then Y = "16"
If X = "85" Or X = "86" Or X = "87" Or X = "562" Or X = "576" Or X = "577" Or X = "578" Then Y = "18"
If X = "706" Or X = "718" Or X = "719" Or X = "720" Or X = "721" Or X = "722" Or X = "723" Or X = "724" Then Y = "42"
GetIt = Y
End Function
```

I am just confused . I am new in vb6

This post has been edited by JackOfAllTrades: 08 June 2013 - 03:27 AM
Reason for edit:: Added code tags

Is This A Good Question/Topic? 0

## Replies To: could any help me to say what does this function does

### #2 JackOfAllTrades

• Saucy!

Reputation: 6193
• Posts: 23,921
• Joined: 23-August 08

## Re: could any help me to say what does this function does

Posted 08 June 2013 - 03:31 AM

It's a really ugly function that compares the Code value that's passed into the function (and uselessly assigned to X) to a bunch of other values, sets Y to a value based on that determination and returns Y to the caller.
Was This Post Helpful? 0

### #3 Neku

• D.I.C Regular

Reputation: 20
• Posts: 268
• Joined: 21-May 09

## Re: could any help me to say what does this function does

Posted 08 June 2013 - 06:34 AM

i belive this is a computer crime
Was This Post Helpful? 0

### #4 modi123_1

• Suitor #2

Reputation: 10483
• Posts: 40,454
• Joined: 12-June 08

## Re: could any help me to say what does this function does

Posted 08 June 2013 - 07:10 AM

What do you mean neku ?
Was This Post Helpful? 0

### #5 BobRodes

• Lovable Curmudgeon

Reputation: 588
• Posts: 3,036
• Joined: 19-May 09

## Re: could any help me to say what does this function does

Posted 10 June 2013 - 08:29 PM

This function shows why VB6 has a bad name. That's what it does. Seriously, this would be much more neatly done using Select Case.
Was This Post Helpful? 0

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }