Wiki

root/cobra/trunk/Tests/100-basics/140-break.cobra

Revision 1181, 344 bytes (checked in by chuck, 4 years ago)

Warn about unnecessary parens on method declarations and calls that have no arguments.

  • Property svn:eol-style set to native
Line 
1namespace Test
2   
3    class Test
4       
5        def main
6            is shared
7               
8            x as int = 0
9            while x<10
10                break
11                x += 1
12            assert x==0
13           
14            x = 1
15            for i as int = 1 .. 10
16                break
17                x = i
18            assert x==1
19           
20            s as String = 'a'
21            for arg as String in Environment.getCommandLineArgs
22                CobraCore.noOp(arg)
23                break
24                s = 'b'
25            assert s=='a'
Note: See TracBrowser for help on using the browser.