| 1 | const ( |
| 2 | // pi |
| 3 | // pi |
| 4 | pi=3.14 |
| 5 | // phi |
| 6 | // phi |
| 7 | // phi |
| 8 | phi=1.618 |
| 9 | //Euler's constant |
| 10 | eulers=2.7182 |
| 11 | supported_platforms = ['windows', 'macos', 'linux', 'freebsd', 'openbsd', |
| 12 | 'netbsd', 'dragonfly', 'android', 'js', 'solaris', 'haiku'] |
| 13 | one_line_supported = ['windows', 'macos', 'linux', 'freebsd', 'openbsd', 'netbsd', 'dragonfly', 'android', 'js', 'solaris', 'haiku'] |
| 14 | another_const = ['a', 'b' |
| 15 | 'c', 'd', 'e' |
| 16 | 'f' |
| 17 | ] |
| 18 | multiline_const = [ |
| 19 | 'first line', 'second line','third line', |
| 20 | 'fourth line'] |
| 21 | ) |
| 22 | |
| 23 | const ( |
| 24 | i_am_a_very_long_constant_name_so_i_stand_alone_and_my_length_is_over_90_characters = ['testforit'] |
| 25 | ) |
| 26 | |
| 27 | pub const ( |
| 28 | i_am_pub_const=true |
| 29 | ) |
| 30 | |
| 31 | const ( |
| 32 | abc = 1 // abc |
| 33 | def = 2 // def |
| 34 | ghi = 3 // ghi |
| 35 | ) |
| 36 | |
| 37 | fn main() { |
| 38 | a := [ |
| 39 | [3, |
| 40 | 5, |
| 41 | 6],[7, 9, 2]] |
| 42 | b := [[ |
| 43 | [2, |
| 44 | 5,8],[ 5, 1, |
| 45 | 3],[ 2, 6, 0]],[ |
| 46 | [9, |
| 47 | 4,5],[ |
| 48 | 7,2,3], |
| 49 | [1, |
| 50 | 2,3]]] |
| 51 | c := [ |
| 52 | [ |
| 53 | [2, |
| 54 | 5,8],[ 5, 1, |
| 55 | 3],[ 2, 6, 0]],[[ |
| 56 | 9, |
| 57 | 4,5],[7,2,3], |
| 58 | [1, |
| 59 | 2,3]]] |
| 60 | } |
| 61 | |