dos_compilers/Microsoft QuickBASIC v1/CALL.BAS
2024-07-01 06:02:54 -07:00

30 lines
612 B
QBasic
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

dim file$(2)
cmd$ = command$
call split(cmd$,file$())
call strip(file$(2))
call printout(file$())
end
sub split(c$,f$(1)) static
mark = instr(c$," ")
f$(1) = left$(c$,mark - 1)
f$(2) = mid$(c$,mark + 1)
end sub
sub strip(f$) static
first$ = left$(f$,1)
while first$ = " "
lng = len(f$)
f$ = right$(f$,lng - 1)
first$ = left$(f$,1)
wend
end sub
sub printout(f$(1)) static
for file% = 1 to 2
open f$(file%) for input as #1
while not eof(1)
line input #1, temp$
print temp$
wend
close #1
next
end sub