A Scripting Language for Web, Linux and Windows

A Scripting Language for Web, Linux and Windows

Command line arguments

v1 [options] <filename>

Options:

-
l              Syntax check only (lint)
-
<file>       Append output to file
-<code>       Run code without <?v1 ?> tags
-v              Show version
-w              Web mode (CGI)

Options only available on Windows:

-b              Run in background (hide window)
-
<priority>   Process priority: -2=IDLE .. 0=Normal .. 3=Realtime

Run file on command line:

v1 filename.v1 [arguments]

Working with command line arguments in V1:

V1 has a global Array 'argv' which contain the arguments.

<?v1 
print (count (argv).' arguments available');
arg1 argv[0]; // Always the executable of V1 e.g. c:\projects\v1\v1.exe
arg2 argv[1]; // Filename of the V1 script e.g. filename.v1
arg3 argv[2]; // First user defined argument
?>

Rund code on command line with -r option:

v1 -"print('Its now '.date('%D %j %F %Y %H:%i:%s'));"
Its now Wed 2 May 2018 11:13:54

The Web mode -w option:

Use -w option to start V1 as CGI interpreter on a Webserver. Therefore you have to configurate your Webserver to call v1 -w for every file which should be interpretated with V1. See also chapter Web mode.

back to Home

V1 Version 0.96 - Documentation generated Sun, 05 May 2024 07:59