home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
pocketbk
/
developmen
/
oplexamp
/
EX_REORD.OPL
< prev
next >
Wrap
Text File
|
1992-08-27
|
511b
|
27 lines
PROC reorder:
LOCAL last%,e$(255),e%,lpos%,n$(128),c%
n$="\dat\*.dbf"
dINIT "Re-order Data file"
dFILE n$,"Filename",0
IF DIALOG REM returns 0 if cancelled
OPEN n$,a,a$
LAST :last%=POS
IF COUNT>0
WHILE last%<>0
POSITION last% :e%=POS
e$=UPPER$(a.a$)
DO
IF UPPER$(a.a$)<e$
e$=UPPER$(a.a$) :e%=POS
ENDIF
lpos%=POS :BACK
UNTIL pos=1 and lpos%=1
POSITION e%
PRINT e$
UPDATE :last%=last%-1
ENDWH
ENDIF
CLOSE
ENDIF
ENDP