Author Topic: skip how does it work?  (Read 3008 times)

0 Members and 1 Guest are viewing this topic.

kryton9

  • Guest
skip how does it work?
« on: June 19, 2011, 08:34:07 PM »
As you can tell I am going through the help again this time focusing things I couldn't figure out.

I couldn't get skip to work? Is it a command or just a reference word to find how to skip code with the commenting symbols?

Charles Pegge

  • Guest
Re: skip how does it work?
« Reply #1 on: June 20, 2011, 02:01:00 AM »

Skip ( ... ) is an alteranative way of excluding code from compilation.

/*  .. */ commenting out is safer during debugging because Skip is sensitive to unbalanced brackets but is it has its uses:

Code: [Select]
'excluding blocks of code
def contract skip
'including blocks of code:
def contract

contract (
...
)

You also have preprocessor:

#define contract

#ifdef contract
...
#endif

Charles

kryton9

  • Guest
Re: skip how does it work?
« Reply #2 on: June 20, 2011, 03:19:19 AM »
Here is a simple working example.
Code: OxygenBasic
  1. skip (
  2.  
  3. print " will I print from inside the skip block? "
  4.  
  5. )
  6.  
  7. print " I am outside of the skip block and should print. "