File: cmdline

package info (click to toggle)
brandy 1.23.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,268 kB
  • sloc: ansic: 39,421; makefile: 91; sh: 1
file content (16 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
REM This program uses the ARGC and ARGV$ functions to display what was
REM passed to the program on the command line
:
REM ARGV$ 0 is the name of the interpreter or an empty string
REM ARGV$ 1 onwards are the parameters
REM ARGC returns the index of the highest parameter
:
count% = ARGC
IF count%=0 THEN
  PRINT"No parameters supplied"
ELSE
  PRINT"Parameters:"
  FOR N%=1 TO count%
  PRINT;N%;TAB(5);ARGV$(N%)
  NEXT
ENDIF