home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
TE2HOST.ZIP
/
GETFSPEC.SCR
< prev
next >
Wrap
Text File
|
1990-12-27
|
1KB
|
43 lines
;; --------------------------------------------------------------------------
;;
;; GetFSpec.scr -- Host mode script suite for TE/2
;; Copyright 1990, Oberon Software, All rights reserved
;;
;; --------------------------------------------------------------------------
global string FileSpec
global string DfltSpec
global string CmdStack
;; ------------------------------------------------------------------------
;; Standard routine for input of file. If there is anything in the string
;; variable "DfltSpec", the prompt is altered and an empty response is
;; set to that string.
subroutine GetFileSpec
if strlen(CmdStack) == 0
FileSpec = ""
if strlen(DfltSpec)
transmit("^M^JEnter file specification [Enter=%s]: ", DfltSpec)
else
transmit("^M^JEnter file specification: ")
endif
FileSpec = rgets(64, 30, 1)
FileSpec = strtrim(FileSpec)
if ((strlen(FileSpec) == 0) and (strlen(DfltSpec) > 0))
FileSpec = DfltSpec
endif
else
FileSpec = CmdStack
CmdStack = ""
endif
endsub
program
gosub GetFileSpec
end