v2 / vlib / v / fmt / tests / consts_input.vv
60 lines · 56 sloc · 905 bytes · 2964855d1511583ae1bd9126cbf13f2e020aa964
Raw
1const (
2// pi
3// pi
4pi=3.14
5// phi
6// phi
7// phi
8phi=1.618
9 //Euler's constant
10eulers=2.7182
11supported_platforms = ['windows', 'macos', 'linux', 'freebsd', 'openbsd',
12 'netbsd', 'dragonfly', 'android', 'js', 'solaris', 'haiku']
13one_line_supported = ['windows', 'macos', 'linux', 'freebsd', 'openbsd', 'netbsd', 'dragonfly', 'android', 'js', 'solaris', 'haiku']
14another_const = ['a', 'b'
15 'c', 'd', 'e'
16 'f'
17 ]
18multiline_const = [
19 'first line', 'second line','third line',
20 'fourth line']
21)
22
23const (
24 i_am_a_very_long_constant_name_so_i_stand_alone_and_my_length_is_over_90_characters = ['testforit']
25)
26
27pub const (
28i_am_pub_const=true
29)
30
31const (
32 abc = 1 // abc
33 def = 2 // def
34 ghi = 3 // ghi
35)
36
37fn main() {
38 a := [
39 [3,
405,
41 6],[7, 9, 2]]
42b := [[
43[2,
445,8],[ 5, 1,
453],[ 2, 6, 0]],[
46[9,
474,5],[
487,2,3],
49[1,
502,3]]]
51c := [
52[
53[2,
545,8],[ 5, 1,
553],[ 2, 6, 0]],[[
569,
574,5],[7,2,3],
58[1,
592,3]]]
60}
61