diff --git a/examples/.gitignore b/examples/.gitignore index e3602845fd..161aa653c5 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1,23 +1,19 @@ /cli -/hello_world +/fibonacci +/fizz_buzz /hanoi +/hello_v_js +/hello_world /json /links_scraper /log -/news_fetcher -/rune -/terminal_control /nbody -/spectral -/database/mysql -/hello_v_js -/fibonacci -/sqlite +/news_fetcher /path_tracing -/gg2 +/quick_sort +/random_ips +/rune +/spectral +/terminal_control + *.ppm -empty_gg_freetype -game_of_life/life_gg -random_ips -vweb/vweb_example -x64/hello_world diff --git a/examples/database/.gitignore b/examples/database/.gitignore new file mode 100644 index 0000000000..b9a0e61282 --- /dev/null +++ b/examples/database/.gitignore @@ -0,0 +1,2 @@ +mysql +sqlite diff --git a/examples/sqlite.v b/examples/database/sqlite.v similarity index 100% rename from examples/sqlite.v rename to examples/database/sqlite.v diff --git a/examples/eventbus/.gitignore b/examples/eventbus/.gitignore index 30319e2761..87a670807f 100644 --- a/examples/eventbus/.gitignore +++ b/examples/eventbus/.gitignore @@ -1 +1 @@ -eventbus \ No newline at end of file +eventbus diff --git a/examples/fizz_buzz.v b/examples/fizz_buzz.v index e8c752afd9..4722cbf3a5 100644 --- a/examples/fizz_buzz.v +++ b/examples/fizz_buzz.v @@ -1,21 +1,18 @@ fn main() { - mut s := '' - - for n in 1..101 { - if n % 3 == 0 { - s += 'Fizz' - } - - if n % 5 == 0 { - s += 'Buzz' - } - - if s == '' { - println(n) - } else { - println(s) - } - - s = '' - } + mut s := '' + for n in 1 .. 101 { + if n % 3 == 0 { + s += 'Fizz' + } + if n % 5 == 0 { + s += 'Buzz' + } + if s == '' { + println(n) + } + else { + println(s) + } + s = '' + } } diff --git a/examples/game_of_life/.gitignore b/examples/game_of_life/.gitignore index 4b10a05285..314a7719d2 100644 --- a/examples/game_of_life/.gitignore +++ b/examples/game_of_life/.gitignore @@ -1 +1,2 @@ life +life_gg diff --git a/examples/gg/.gitignore b/examples/gg/.gitignore new file mode 100644 index 0000000000..8bbfec4895 --- /dev/null +++ b/examples/gg/.gitignore @@ -0,0 +1,2 @@ +/gg_freetype +/gg2 diff --git a/examples/gg2.v b/examples/gg/gg2.v similarity index 100% rename from examples/gg2.v rename to examples/gg/gg2.v diff --git a/examples/empty_gg_freetype.v b/examples/gg/gg_freetype.v similarity index 100% rename from examples/empty_gg_freetype.v rename to examples/gg/gg_freetype.v diff --git a/examples/hello_v_js.v b/examples/hello_v_js.v index 41ab9c1bf7..5f4c71e115 100644 --- a/examples/hello_v_js.v +++ b/examples/hello_v_js.v @@ -1,5 +1,5 @@ fn main() { - for i in 0..3 { - println('Hello from V.js') - } + for i in 0 .. 3 { + println('Hello from V.js') + } } diff --git a/examples/hello_world.v b/examples/hello_world.v index d93c76358a..fb964162bb 100644 --- a/examples/hello_world.v +++ b/examples/hello_world.v @@ -1,2 +1 @@ println('Hello, World!') - diff --git a/examples/sdl/basic_window/.gitignore b/examples/sdl/basic_window/.gitignore new file mode 100644 index 0000000000..ba2906d066 --- /dev/null +++ b/examples/sdl/basic_window/.gitignore @@ -0,0 +1 @@ +main diff --git a/examples/sdl/tvintris/.gitignore b/examples/sdl/tvintris/.gitignore new file mode 100644 index 0000000000..9dd8a97d4f --- /dev/null +++ b/examples/sdl/tvintris/.gitignore @@ -0,0 +1 @@ +tvintris diff --git a/examples/sokol_examples/.gitignore b/examples/sokol/.gitignore similarity index 100% rename from examples/sokol_examples/.gitignore rename to examples/sokol/.gitignore diff --git a/examples/sokol_examples/drawing.v b/examples/sokol/drawing.v similarity index 100% rename from examples/sokol_examples/drawing.v rename to examples/sokol/drawing.v diff --git a/examples/sokol_examples/fonts.v b/examples/sokol/fonts.v similarity index 100% rename from examples/sokol_examples/fonts.v rename to examples/sokol/fonts.v diff --git a/examples/vweb/.gitignore b/examples/vweb/.gitignore index 1c9390a1d3..aeff3f87f0 100644 --- a/examples/vweb/.gitignore +++ b/examples/vweb/.gitignore @@ -1 +1 @@ -test_app +vweb_example diff --git a/examples/x64/.gitignore b/examples/x64/.gitignore new file mode 100644 index 0000000000..242c034c12 --- /dev/null +++ b/examples/x64/.gitignore @@ -0,0 +1 @@ +hello_world