Trailing-Edge - PDP-10 Archives - tops10and20_integ_tools_v9_3-aug-86 - tools/crc/ind/tind.cmd
There are no other files named tind.cmd in the archive.
;	This is a test IND file
.ifdf golab .if golab ne "" .goto 'golab'
.start:	SYSTAT all
.disable control-z
.ASK	yesno	Do you want to asnwer yes or no ?
.askn	asknum	How many things do you want ?
.sets	string1	"This is the first string symbol"
.sets	str2	"Hello there -" 
.enable trace
.setn	num1	1234
.setn num2     	100
.end: .disable trace
.ifT	yesno	;	You answered yes, did you not ?
.iff	yesno	;	You appeared to have answered no.
;	You are going to get 'asknum' thingummies
;	A string symbol:	'string1'
; 'str2''string1'
;	Value of symbol 1: 'num1'
;	Value of symbol 2: 'num2'
.ifdf	num2 .askn [23:34:26]  symnum	How many symbols did you define ?
.sets	longstr	"This is a long string which I will later substring"
;	'symnum' was your answer
;	'longstr'
.sets	shtstr	longstr[4:11]
;	'shtstr'
.sett	log1
.setf	log4
.ift	log1	;log1 must be true
.ift	log4	;log4 must be true, but it isnt
;	Test DDT
;	test string length stuff
.tasks: .asks test Enter a string:
;	Length was '<strlen>'
.if <strlen> ne 0 .goto tasks
;	Test .TESTFILE directive
.tsfil: .asks [3:80] stsfil Enter a filename to be checked
.if stsfil eq "end" .goto tsfl1
.gosub chkfld
.ift badfld .goto tsfil
.testfile 'stsfil'
.if <filestat> eq 0 ;	File does not exist
.if <filestat> eq 1 ;	File exists
.if <filestat> eq -1 ;	File is deleted
.if <filestat> eq 0 .goto tsfil	;Can do no more
;	Full filespec is:
;	File created: '<FILCRE>', last read '<FILRED>'
.goto tsfil
.tsfl1: .disable substitution
.enable substitution
.setf goflg
.ask	goflg	Do you want to go back to the start ?
.ift goflg	.goto start
.ifndf	crud .run          sys:rev *.rel
.sets	dirnam "system"
dir <'dirnam'>
;	more comments
.setf	log1
.iff	log1	i mem
i moni
;	Subroutine to stop TESTFILE giving fatal errors
.chkfld: .setf badfld
.parse stsfil ":" struct direct
.setf blkstr
.if <strlen> = 2 .goto chkfl1
	.sets direct struct
	.sets struct "PS"
	.sett blkstr
.chkfl1: .parse direct "<>" null direct trail
.if null ne "" .if direct ne ""  .goto woopsfld
.if direct = "" .gosub defdir
.sets one direct[1:1]
.test direct
.if one ="<" .sets direct direct[2:<strlen>-1]
.testfile 'struct':<root-directory>'direct'.directory
.if <filestat> = 1 .return	;seems OK
.sett badfld
;	Invalid directory
.woopsfld: ;	Bad parse in direct
.sett badfld

.defdir: .sets direct "'<directory>'"
.parse direct ":<>" tstruct null direct trail
.ift blkstr .sets struct tstruct