From 814998ec10ba2f3df8cb40d787f309ea56e1ee34 Mon Sep 17 00:00:00 2001 From: JalonSolov Date: Thu, 4 Mar 2021 14:52:55 -0500 Subject: [PATCH] docs: fix errors in docs.md (#9118) --- doc/docs.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 939175473b..df64ce8023 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -194,16 +194,16 @@ println('hello world') Suppose you have a folder with several .v files in it, where one of them contains your `main()` function, and the other files have other helper -functions, perhaps organized by topics, but still *not yet* structured -enough, to be their own separate reusable modules, and you want to compile +functions. The may be organized by topic, but still *not yet* structured +enough to be their own separate reusable modules, and you want to compile them all into one program. -In other languages, you would have to use includes or a build system, +In other languages, you would have to use includes or a build system to enumerate all files, compile them separately to object files, then link them into one final executable. In V however, you can compile and run the whole folder of .v files together, -using just: `v .` and `v run .` . Passing parameters also works, so you can +using just `v run .`. Passing parameters also works, so you can do: `v run . --yourparam some_other_stuff` The above will first compile your files into a single program (named @@ -216,15 +216,13 @@ import os println(os.args) ``` - -NB: after a successfull run, `v run .` will delete the generated executable. +NB: after a successful run, V will delete the generated executable. If you want to keep it, use `v -keepc run .` instead, or just compile manually with `v .` . -NB: any V compiler flags should be passed *before* the `run` command, +NB: any V compiler flags should be passed *before* the `run` command. Everything after the source file/folder, will be passed to the program -as is, it will not be processed by V. - +as is - it will not be processed by V. ## Comments