help with numbers !

Discussion in 'ASP General' started by John Smith, Jun 30, 2003.

  1. John Smith

    John Smith Guest


    I'm just trying to work out the postage costs for a shopping cart and for
    some reason (possibly me being silly) i can't get the following to work :

    Dim strWeight3, strWeight4
    strWeight3 = "950"
    If strWeight3<="1000" Then strWeight4="3.32" Else strWeight4="7.50"
    Response.Write(strWeight3 & "&nbsp;/&nbsp;")

    So the weight's in Grammes, If it's over 1000g then the price is 7.50
    otherwise it's 3.32.
    The problem is this will only return the figure 7.50 for some reason

    Any pointers appreciated.

    John Smith, Jun 30, 2003
    1. Advertisements

  2. John Smith

    Evertjan. Guest

    John Smith wrote on 30 jun 2003 in microsoft.public.inetserver.asp.general:
    comparing two strings alphabetically:

    each character is compared by its ascii value,
    and strings from left to right,
    till there is a difference:

    "9" < "A"

    "A" < "a"

    "8" > "1"

    "abc1" < "abc2"

    "adc1" > "abc1"

    "bbb" > "abbb"

    "800" > "1000"
    Evertjan., Jun 30, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.