Do If and If Statements

Discussion in 'SPSS' started by Allen, Oct 28, 2011.

  1. Allen

    Allen Guest

    Couldn't find documentation, aka I RTFM, and couldn't find a specific
    reference to it, but it appears that nesting an "If Statement" within
    a "Do If" worked. Could this be my imagination or have others done
    this?

    Thanks
     
    Allen, Oct 28, 2011
    #1
    1. Advertisements

  2. Allen

    Rich Ulrich Guest


    Sure, you can nest any sort of computation statements
    within DO IF, including another DO IF. Not to mention simplly IF.
     
    Rich Ulrich, Oct 28, 2011
    #2
    1. Advertisements

  3. Allen

    Art Kendall Guest

    Sure I have done this numerous times.
    I have also nested DO IFs with other DO IFs.
    The simple IF within the DO IF block would only execute if that block
    were reached.

    Art Kendall
    Social Research Consultants
     
    Art Kendall, Oct 28, 2011
    #3
  4. Allen

    David Guest

    Sure! Why not?
     
    David, Oct 28, 2011
    #4
  5. Allen

    Allen Guest

    Thanks for the response(s). I've nested a "Do If" with a "Do If" but
    never an
    "If" statement with a "Do If" probably because I never pieced the
    logic to-
    gether, i.e., any computational statement within a "Do If" as
    mentioned by
    Colonel Ulrich.
     
    Allen, Oct 29, 2011
    #5
  6. Allen

    Allen Guest

    Thanks for the response(s). I've nested a "Do If" with a "Do
    If" (Thanks Art Kendall) but
    never an "If" statement with a "Do If" probably because I never pieced
    the
    logic together, i.e., any computational statement within a "Do If" as
    mentioned by Colonel Ulrich.
     
    Allen, Oct 29, 2011
    #6
    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.