Results 1 to 7 of 7

Thread: ASP help!

  1. #1

    ASP help!

    Can any one please tell me whats wrong in this while loop. Whenever I run this code in ASP I get a compilation error '800a0400' where WEND is situated. 'Expected Statement'
    I thing I am forgetting something, can anyone inform me what it is? Thanks in advance.

    I = 1
    SUM = 0

    WHILE (I < 11)
    AI = "A" & I
    IF (RS(AI) = "1") THEN
    SUM = SUM + 10
    ELSE IF (RS(AI) = "2") THEN
    SUM = SUM + 5
    ELSE
    SUM = SUM + 2.5
    END IF
    I = I + 1
    WEND
    With great power comes great responsibility.

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Posts
    175

    You left out an End If

    hollow_man,

    You left out an "End If"


    I = 1
    SUM = 0

    WHILE (I < 11)
    AI = "A" & I
    IF (RS(AI) = "1") THEN
    SUM = SUM + 10
    ELSE
    IF (RS(AI) = "2") THEN
    SUM = SUM + 5
    ELSE
    SUM = SUM + 2.5
    END IF
    END IF '<< You left this out
    I = I + 1
    WEND

    Enjoy
    Simon Templer
    Simon Templer

    \"Your work is to discover your world and then with all your heart give yourself to it. \"
    -The Buddha

  3. #3
    Junior Member
    Join Date
    Aug 2002
    Posts
    28
    Not real sure so could you tell me what kinda laungauge that is?

    Black-Mage21
    \"You impressed me, and I\'m not easily impressed... Wow a BLUE CAR!\"

  4. #4
    Senior Member
    Join Date
    Oct 2001
    Posts
    175

    The Language

    Black-Mage21 ,

    The language is VBScript.

    Simon Templer
    Simon Templer

    \"Your work is to discover your world and then with all your heart give yourself to it. \"
    -The Buddha

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    472
    vbscript
    ---
    proactive

  6. #6
    Member
    Join Date
    Oct 2001
    Posts
    60
    Originally posted here by Black-Mage21
    Not real sure so could you tell me what kinda laungauge that is?

    Black-Mage21

    How could you help if you dont know what language it is?....

  7. #7
    Thank you Simon for a great help. Its difficult sometimese to catch small problems such as these.
    Thanx again bud.
    With great power comes great responsibility.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •