home *** CD-ROM | disk | FTP | other *** search
- $! popd.com - pop one or more directories from stack
- $
- $ if f$type(dir_stack) .eqs. "" then dir_stack :== ""
- $ if f$type(p1) .nes. "INTEGER" then p1 = 1 ! default # to pop: 1
- $ if p1 .lt. 0 then p1 = - p1
- $ if dir_stack .nes. "" then goto loop
- $ write sys$output "Directory stack empty"
- $ exit
- $loop:
- $ newdir = f$element(0," ",dir_stack)
- $ dir_stack == dir_stack - newdir - " "
- $ p1 = p1 - 1
- $ if p1 .gt. 0 .and. dir_stack .nes. "" then goto loop
- $ set def 'newdir
- $ if f$type(dirs) .eqs. "" then dirs :== show default
- $ dirs
-