-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathNEW-FILE
54 lines (54 loc) · 960 Bytes
/
NEW-FILE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
*
GIT.FILENAME = 'NEW-FILE'
GIT.REPO = 'https://github.com/Krowemoh/TCL-Utilities.git'
*
* COMPILER DIRECTIVES
*
$DEFINE DATABASE.QM
$DEFINE PLATFORM.LINUX
*
@USER1 = 'NEW-FILE'
@USER2 = 'NEW-FILE'
*
EQU TRUE TO 1
EQU FALSE TO 0
*
CALL GET.ARGUMENTS(ARGS)
*
ARGS.LEN = DCOUNT(ARGS,@AM)
*
IF ARGS.LEN = 1 THEN
PRINT 'NEW-FILE - Create a new PICK file'
PRINT
PRINT ' NEW-FILE {FILE-NAME}'
PRINT
STOP
*
END ELSE IF ARGS.LEN # 2 THEN
PRINT 'Invalid option'
STOP
END
*
FILE.NAME = ARGS<2>
*
OPEN '',FILE.NAME TO FILE THEN
PRINT 'File already exists: ' : FILE.NAME
STOP
END
*
$IFDEF DATABASE.UV
EXECUTE 'CREATE-FILE ' : FILE.NAME : ' 53,2,6 101,4,18'
$ENDIF
*
$IFDEF DATABASE.QM
EXECUTE 'CREATE-FILE ' : FILE.NAME
$ENDIF
*
$IFDEF DATABASE.D3
EXECUTE 'CREATE-FILE ' : FILE.NAME : ' 7 101'
$ENDIF
*
* END OF PROGRAM
*
END
*