Login | |
|
 |
help - 6/1/2007 3:34:02 AM
|
|
 |
|
| |
Rany
Posts: 1
Score: 0
Joined: 6/1/2007
Status: offline
|
Original message moved by dm_4ever Reason : Moving To Appropriate Forum hello all set R2 = database.Execute("select number,msgl,msgr from lovemeter") do while not R2.EOF Dim l(20), r(20), testl, testr As String Dim length_l, lenght_r, valueleft, valueright, value, a, b As Integer valueleft = 0 valueright = 0 a = 1 b = 1 msg_l = R2("msgl") msg_r = R2("msgr") length = len(msg) length_l = len(msg_l) lenght_r = len(msg_r) do l(a) = Mid(msg_l,a,1) valueleft = Asc(l(a)) + valueleft a = a + 1 loop until a = lenght_l + 1 do r(b) = Mid(msg_r,b,1) valueright = Asc(r(b)) + valueright b = b + 1 loop until b = length_r + 1 i cant seem to understand why i the function asc is not recognised what i need is to convert the string to ASCII please help...
|
|
| |
|
|
|
 |
RE: help - 6/1/2007 4:43:34 AM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1194
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
|
What you posted is VB, not VBScript. In VBScript, the Asc() function returns the ANSi code for the first letter of the string passed to it. IE. Asc("Test") would return the same as Asc("T") Also, your Dim statements will return errors, as in VBScript all variables are type Variant, and cannotn be Dim'med as a particular type.
_____________________________
"Would you like to touch my monkey?" - Dieter (Mike Meyers) "It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury
|
|
| |
|
|
|
|
|