Files, extensions and tags
A Novis program is a file with the extension .nvs that starts its code with <?nvs.
The extension is a convention. nvs run accepts any path and reads only the content of the file. nvs test is the one command that uses the extension. It uses it to choose between its two kinds of test.
A file may start with a #! line. Novis skips that line and reads the lines after it as code. With #!/usr/bin/env nvs as the first line, you can run the file as a command on Linux and macOS.
Good to know: <? alone is not a tag. Novis copies it to the output as text.
Examples
A script you run as a command
#!/usr/bin/env nvs// This file starts with a `#!` line, so you can run it as `./checklist` on Linux and macOS.// Novis skips that first line, and the code starts right after it without `<?nvs`.
array<string> $tasks = ['Back up the database', 'Rotate the logs', 'Check the free disk space'];uint $number = 1;// This prints each task with its number, from 1 to 3.foreach ($tasks as string $task) { echo $number, '. ', $task, "\n"; $number = $number + 1;}1. Back up the database2. Rotate the logs3. Check the free disk space