Shop OBEX P1 Docs P2 Docs Learn Events
IF without an expression — Parallax Forums

IF without an expression

adriftadrift Posts: 25
edited 2007-09-30 13:54 in General Discussion
In SASM, can IF be used without an expression?· In other words, is the following snippet meaningful:

IF 0
.
.
.
ENDIF

What is being tested?


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


Regards,
Jim

Comments

  • PJMontyPJMonty Posts: 983
    edited 2007-09-30 04:07
    Adrift,

    This is typically used to comment out a block of code. The "if" conditional will fail with zero as the test value, so everything inside will not get assembled.

    Thanks,
    PeterM
  • adriftadrift Posts: 25
    edited 2007-09-30 13:54
    Thank you. I thought I was near typical before, but maybe I'm closer now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Regards,
    Jim
Sign In or Register to comment.