Wiki

Changes between Initial Version and Version 1 of Pass

Show
Ignore:
Timestamp:
02/15/10 02:18:23 (15 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Pass

    v1 v1  
     1= Pass = 
     2 
     3Do nothing successfully. 
     4 
     5Used as a placeholder or for null operation where code is expected (like in a block) 
     6but nothing needs to be done. 
     7 
     8== Grammar == 
     9{{{ 
     10pass 
     11}}} 
     12 
     13== Examples == 
     14{{{ 
     15def methodNeededForInterface # but not used 
     16    pass 
     17 
     18# simplify complicated code flow. 
     19if .complicatedExpression0 
     20    if .expression1 and .expression2 and not .expression3 or expression4  
     21        pass # all is well 
     22    else if expression1 and not expression2 
     23        .expressFailure 
     24    else if .expression3 
     25        .expressFailure2 
     26    # ... 
     27 
     28 
     29# property with both getter and setter, setter must be available but does nothing 
     30pro isUsed as bool 
     31    get 
     32        return false 
     33    set 
     34        pass 
     35 
     36try 
     37   .doOperation 
     38catch FormatException 
     39   pass    # trap and discard the exception 
     40 
     41}}} 
     42 
     43 
     44 
     45== Notes ==