home *** CD-ROM | disk | FTP | other *** search
- /*
- @BDeleteRange @P@ICopyright Gold Disk Inc., February, 1992
-
- Use this Genie to delete a range of pages.
- */
- cr = '0a'x
-
- address command
- call SafeEndEdit.rexx()
- first = ppm_DocFirstPage()
- last = ppm_DocLastPage()
- form = "from:"first'0a'x "to:"last
-
- form = ppm_GetForm("Enter Range Of Pages:", 5, form)
- if form = '' then exit_msg()
- parse var form startpage'0a'x endpage
-
- if ~DataType(startpage, 'N') then exit_msg('Invalid Input:'startpage)
- if ~DataType(endpage, 'N') then exit_msg('Invalid Input:'endpage)
-
- call ppm_AutoUpdate(0)
- if last = 0 then exit_msg()
- if startpage < first then exit_msg('Invalid Range')
- else if startpage > last then exit_msg('Invalid Range')
- if endpage < first then exit_msg('Invalid Range')
- else if endpage > last then exit_msg('Invalid Range')
-
- if startpage > endpage then exit_msg('Invalid Range')
-
- call ppm_DeletePage(startpage, endpage - startpage + 1)
-
- exit_msg()
-
- exit_msg:
- do
- parse arg message
-
- if message ~= '' then call ppm_Inform(1, message,)
- call ppm_AutoUpdate(1)
- exit
- end
-
-