home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
pocketbk
/
utilsu
/
wld
/
FDIAL.OPL
next >
Wrap
Text File
|
1992-03-17
|
999b
|
63 lines
PROC fdial:
LOCAL h%
LOCAL fr%(21),adco%
LOCAL astate%
LOCAL nul$(4),adno%
LOCAL country$(22),cbeg$(1)
LOCAL cdata%(37),addial%
LOCAL cdial$(18)
LOCAL line%
IOOPEN(h%,"WLD:",-1)
nul$=""
adno%=addr(nul$)+1
IOW(h%,11,#adno%,fr%())
adco%=addr(fr%())+21
astate%=0
addial%=addr(cdata%())+56
line%=0
while 1
getzts:(addr(country$),adco%)
cbeg$=upper$(left$(country$,1))
if astate%=0
if cbeg$<>"A"
astate%=1
endif
else
if cbeg$="A"
break
endif
endif
if line%=8
print "Press any key to continue"
get
line%=0
endif
line%=line%+1
IOW(h%,23,cdata%(),#0)
getzts:(addr(cdial$),addial%)
print country$,"(";cdial$;")"
IOW(h%,13,fr%(),#0)
endwh
print "End of database"
get
ENDP
PROC getzts:(out%,in%)
LOCAL o%,i%,b%,l%
o%=out%+1
i%=in%
l%=0
while 1
b%=PEEKB(i%)
if b%
POKEB o%,b%
l%=l%+1
o%=o%+1
i%=i%+1
else
POKEB out%,l%
return
endif
endwh
endp