Changes between Version 3 and Version 4 of Literals
- Timestamp:
- 11/22/10 19:57:27 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Literals
v3 v4 11 11 e.g 12 12 {{{ 13 #!cobra 13 14 names = [ 'mike', 'gary', 'pat', 'bruce', 'paul'] # List<of String> 14 15 heads = [3,1,1,1,1] # List<of int> … … 26 27 e.g. 27 28 {{{ 29 #!cobra 28 30 nameId = { 'mike':10110, 'gary':21003, 'paul':32289 } # Dictionary<of String, int> 29 31 assert nameId['mike'] == 10110 … … 42 44 e.g. 43 45 {{{ 46 #!cobra 44 47 names= {'gary', 'mike', 'bruce', 'paul'} 45 48 assert names.intersection({'gary', 'paul'} == {'gary', 'paul'} … … 75 78 76 79 {{{ 80 #!cobra 77 81 d = 123 # default (Decimal) 78 82 d = 123.4d