Announcement

Collapse
No announcement yet.

Usage of #If 0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Knuth Konrad
    replied
    Yes, you can abuse #If 0/#End If as an otherwise in BASIC missing block comment function. Paul Squire's Jellyfish will even display such a block as a comment.

    Leave a comment:


  • Ian Bayly
    replied
    Thanks William.

    Wow1 - how fast was that - 4mins from question to answer!!

    Ian B

    Leave a comment:


  • William Burns
    replied
    Basically it is a way to exclude compiling a section of code. Because "#IF 0" can never equal true, so it will always be excluded.

    You could do the same thing by rem'ing out each line too, but the #IF 0 takes less typing to block out a section of code.

    Bottom line is you can ignore code inside the #IF 0/#END IF section since the compiler will ignore it.

    Leave a comment:


  • Ian Bayly
    started a topic Usage of #If 0

    Usage of #If 0

    A very simple answer I'm sure, but I see in various code samples:
    Code:
    #If 0
    ...
    #End If
    I understand what the Help tells me re #If but I cannot understand what the above usage does.
    What am I missing please?

    Ian B
    Last edited by Gary Beene; 25 Jul 2014, 11:27 PM. Reason: Code: tags
Working...
X
😀
🥰
🤢
😎
😡
👍
👎