Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Asp to VFP
Message
 
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01341272
Message ID:
01341283
Views:
12
I did the conversion myself

At least I will learn some asp :)

However, the VFP code I create become endless
When I execute the button in the form, the time simbol appears and never finish

Could anybody take a look below and give me an opinion ?

I noticed that the asp code do not use ENDFOR

Moises
**********************************************************


strSecretEdit = " xxxxxxxxxxxx"

strName = " "

*For each of the 12 letters in the input strings
For idx3 = 1 to 12
if strBookID = "123" Then
ascInStrBookID = 1
Else
ascInStrBookID = Asc(subst(strBookID,idx3,1))
EndIf

ascInStrUserName = Asc(subst(strUserName,idx3,1))
ascInStrBookTitle = Asc(subst(strBookTitle,idx3,1))
ascInStrSecretEdit = Asc(subst(strSecretEdit,idx3,1))



* ascKeyChar1 = ascInStrUserName XOR ascInStrBookTitle XOR ascInStrSecretEdit XOR ascInStrBookID

ascKeyChar1 = BITXOR(ascInStrUserName , ascInStrBookTitle , ascInStrSecretEdit , ascInStrBookID)


if ascKeyChar1 = 0 Then
ascKeyChar1 = 255
EndIf
*strName = strName & chr(ascKeyChar1)

strName = strName + chr(ascKeyChar1)


Next
For idx4 = 1 to 12
* Select Case idx4
DO CASE
CASE idx4 = 1
intAdd = 6
CASE idx4 = 2
intAdd = 14

CASE idx4 = 3
intAdd = 9

CASE idx4 = 4
intAdd = 15

CASE idx4 = 5
intAdd = 3

CASE idx4 = 6
intAdd = 5

Case idx4 = 7
intAdd = 1

CASE idx4 = 8
intAdd = 18

CASE idx4 = 9
intAdd = 13

CASE idx4 = 10
intAdd = 8

CASE idx4 = 11
intAdd = 12

CASE idx4 = 12
intAdd = 19

*End Select

ENDCASE

ascKeyChar2 = asc(subs(strName,idx4,1)) + intAdd
*Do until ascKeyChar2 < 91
Do WHILE ascKeyChar2 < 91
ascKeyChar2 = (ascKeyChar2-25)
LOOP
ENDDO

* Do until ascKeyChar2 > 64
Do WHILE ascKeyChar2 > 64
ascKeyChar2 = (ascKeyChar2+25)
LOOP
ENDDO
* strRegKey = strRegKey & chr(ascKeyChar2)
strRegKey = strRegKey + chr(ascKeyChar2)

Next
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform