By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,607 Members | 1,764 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,607 IT Pros & Developers. It's quick & easy.

Upgrde Help

P: n/a
Hi Guys,

Im trying to upgrade some code to asp.net but im getting a few errors
on a couple of sectionsL

they errors are in the following

in the above below it doesnt seem to like the string function:

lStrPadMessage = pStrMessage & Chr(128) & STRING((128 - (lLngLen Mod
64) - 9) Mod 64, Chr(0)) & STRING(4, Chr(0)) & Chr(lBytLenW(0)) &
Chr(lBytLenW(1)) & Chr(lBytLenW(2)) & Chr(lBytLenW(3))

in the code below asp.net vb doesnt seem to like the array code

lVarWordWAry(lIntT) = ARRAY(Asc(Mid(lStrWordText, 1, 1)),
Asc(Mid(lStrWordText, 2, 1)), Asc(Mid(lStrWordText, 3, 1)),
Asc(Mid(lStrWordText, 4, 1)))

any help or workarounds appreciated

thanks

CG

Oct 3 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"csgraham74" <cs********@gmail.comschrieb:
Im trying to upgrade some code to asp.net but im getting a few errors
on a couple of sectionsL

they errors are in the following

in the above below it doesnt seem to like the string function:

lStrPadMessage = pStrMessage & Chr(128) & STRING((128 - (lLngLen Mod
64) - 9) Mod 64, Chr(0)) & STRING(4, Chr(0)) & Chr(lBytLenW(0)) &
Chr(lBytLenW(1)) & Chr(lBytLenW(2)) & Chr(lBytLenW(3))
'String' ='StrDup' or the 'String' class' constructor.
in the code below asp.net vb doesnt seem to like the array code

lVarWordWAry(lIntT) = ARRAY(Asc(Mid(lStrWordText, 1, 1)),
Asc(Mid(lStrWordText, 2, 1)), Asc(Mid(lStrWordText, 3, 1)),
Asc(Mid(lStrWordText, 4, 1)))
\\\
.... = _
New <Type>() { _
<Item 1>, _
<Item 2>, _
..., _
<Item n_
}
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Oct 3 '07 #2

P: n/a
thanks for that

i got the second of the two issues sorted so thank you but im still
just not sure about the first one

lStrPadMessage = pStrMessage & Chr(128) & STRING((128 - (lLngLen Mod
64) - 9) Mod 64, Chr(0)) & STRING(4, Chr(0)) & Chr(lBytLenW(0)) &
Chr(lBytLenW(1)) & Chr(lBytLenW(2)) & Chr(lBytLenW(3))

it is the STRING function that has the old blue line under it and says
'string' is a class and csnnot be used as an expression.

sorry for the trouble - but if possible could you give me a little
more on this. i have tried the following but could you tell me if it
is the same thing as the line above ??????

Dim str As String = New String(Chr(0), (128 - (lLngLen Mod 64) - 9)
Mod 64)
Dim str2 As String = New String(Chr(0) & Chr(lBytLenW(0)) &
Chr(lBytLenW(1)) & Chr(lBytLenW(2)) & Chr(lBytLenW(3)), 4)

lStrPadMessage = pStrMessage & Chr(128) & str & str2 &
Chr(lBytLenW(2)) & Chr(lBytLenW(3))

thanks again

Colin

Oct 4 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.