Windows Vista Forums

Re: length of IF..THEN statement in VBS......

  1. #1


    Mayayana Guest

    Re: length of IF..THEN statement in VBS......

    Look up Select Case

    |
    | question is: how long can this IF..THEN statement be?
    |
    | it is currently 42 lines.
    |



      My System SpecsSystem Spec

  2.   


  3. #2


    Dave \Crash\ Dummy Guest

    Re: length of IF..THEN statement in VBS......

    Mayayana wrote:

    > | | question is: how long can this IF..THEN statement be?
    > | | it is > currently 42 lines. |

    > Look up Select Case
    Can you be more specific? I can't find anything in the Select Case or
    If...Then...Else documentation that answers the question.
    --
    Crash

    "Patriotism is the last refuge of a scoundrel."
    ~ Samuel Johnson ~

      My System SpecsSystem Spec

  4. #3


    Mayayana Guest

    Re: length of IF..THEN statement in VBS......

    |I wasn't looking for ways of cleaning up the script. sorry if i gave that
    | idea. i am looking for the limit of how big an IF..THEN statement can
    be,
    | espcecially when using the continuation syntax.
    |

    It just doesn't make sense to do it that way. If...Then
    is not designed for that. If that's really what you want to
    do then you'll just have to write it and see if it works.

    Select Case srvname
    Case "a", "b", "c"

    Case "d", "e". "f"

    End Select


    If Select Case doesn't seem ideal then you could
    do what Pegasus suggests, or even put them into
    an array:

    For i = 0 to UBound(ArrayList)
    If ArrayList(i) = srvname then
    ' do something
    Exit For
    End If
    Next

    | --
    | Thanks,
    | Bill
    |
    |
    | "Mayayana" wrote:
    |
    | > Look up Select Case
    | >
    | > |
    | > | question is: how long can this IF..THEN statement be?
    | > |
    | > | it is currently 42 lines.
    | > |
    | >
    | >
    | > .
    | >



      My System SpecsSystem Spec


Re: length of IF..THEN statement in VBS......
Similar Threads
Thread Forum
Line length Live Mail
Re: DOS DIR and length Vista General
Length of lines Vista mail
gwmi collection length in if statement PowerShell
length of vista Vista General