home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sources / hp48 / 232 < prev    next >
Encoding:
Text File  |  1992-07-28  |  4.5 KB  |  117 lines

  1. Newsgroups: comp.sources.hp48
  2. Path: sparky!uunet!seq!spell
  3. From: Glenn Robertson <73117.675@CompuServe.COM>
  4. Subject:  v06i011:  find2_gr - Binary search function for Roldx 4.X v1.1, Part01/01
  5. Message-ID: <1992Jul29.011603.22577@seq.uncwil.edu>
  6. Followup-To: comp.sys.hp48
  7. Sender: spell@seq.uncwil.edu (Chris Spell)
  8. Organization: Univ. of North Carolina @ Wilmington
  9. Date: Wed, 29 Jul 1992 01:16:03 GMT
  10. Approved: spell@seq.uncwil.edu
  11. Lines: 108
  12.  
  13. Checksum: 1936534245 (verify with brik -cv)
  14. Submitted-by: Glenn Robertson <73117.675@CompuServe.COM>
  15. Posting-number: Volume 6, Issue 11
  16. Archive-name: find2_gr/part01
  17.  
  18.  
  19. BEGIN_DOC find2.doc
  20. The following program is intended to be used with Jim Weisbin's Roldx 4.X
  21. (both version 4.0 and 4.1) "rolodex" program.  The program allows 
  22. relatively fast searches of any size file from with the main RLDX
  23. program.  Test searches on a file with 90 records (10,990.5 bytes)
  24. indicate that any record can be accessed in just over one second.  In
  25. theory, larger files will not change this time appreciably.
  26.  
  27. This program is provided with Jim Weisbin's permission.
  28.  
  29. Two versions of the program are included: 1) find2.UUE; and 2) find2.ASC.
  30.  
  31. Instructions -
  32.  
  33. 1) find2.UUE - UUDECODE and download into the ROLDX directory as 'find2'.
  34.  
  35. 2) find2.ASC - Download and covert using ASC->.  Save as find2 in the
  36. ROLDX directory.
  37.  
  38. Next - modify ROLDX by adding the following to the CASE statements:
  39.  
  40.        CASE { 25.1
  41. 34.1 26.2 } x POS
  42. . . .
  43.        END x IP 52
  44. SAME
  45.        THEN edit
  46.        END x IP 53      <--- this
  47. SAME                    <--- is
  48.        THEN find2       <--- new
  49.        END {54 85
  50. . . .
  51.  
  52. These commands will make the binary search function accessable by pressing
  53. key 53 ("EEX").  As many characters as you like can be entered, however, 
  54. the search only compares the first letter entered.  The list searched
  55. must be in ALPHABETIC ORDER for this function to work correctly.
  56.  
  57. During execution of the binary search (ie., once the EEX key has been
  58. pressed) you will be prompted for the text to find.  Any number of
  59. characters can be entered, however, the search is only on the first
  60. character.  If an incorrect entry is made, all characters can easily be
  61. erased by pressing the ATTN key. If no characters are present and the
  62. ATTN key is pressed, the function will abort and return to ROLDX at
  63. previous position.  An advantage of inputing more than one character when
  64. using this function is that it allows a fast initial search using the 
  65. binary search and a "first" character hit, and then a more detailed
  66. sequential search using the ROLDX's 'find' (alpha key) function.
  67. Additional characters are automatically saved.
  68.  
  69. 'find2' performs a variable check and the following variables must be 
  70. present and be of the correct type before it proceeds: rdNAME, rdSIZ,
  71. rdPOS, and rdTXT.
  72.  
  73. The function seems to work without any problems, however, as this is my 
  74. first attempt at a system RPL program, I recommend that you backup your
  75. HP48 before running it.  Checksum # 17084d, 386 bytes.
  76.  
  77. Hope you find this useful!
  78.  
  79. Glenn Robertson (Compuserve 73117,675) - comments are welcome!
  80. END_DOC
  81.  
  82.  
  83. BEGIN_ASC find2.asc
  84. %%HP: T(3)A(D)F(.);
  85. "D9D2051A81E5E40D9D209FF3030040D0040710401204047A2003D4303D4303D4
  86. 303D4303D43B21300D47084E20602746E414D454C2A20F00006496E646A3FD55
  87. 04CA364CA369E5509FF300CA30FEF3044F248DA16D9D204B2A20E51684E20502
  88. 7463594A584E2050274605F43584E20502746458545A7B8121F811192031135D
  89. 9D20852300F51652616881306B3167E316479A2DB056CB9A2DB056479A206FA2
  90. 2A1709FF307E3166B3167F4910ED304EC30EE170D9D20D9D208813000616AEC8
  91. 1C9B261192010000C9B26DE05088130C57465161615A50C5416DE05015A50B05
  92. 91178A28DA16D9D20E04160E516B2130D9D20E04160F516B213084E20602746E
  93. 414D4546B3167E316479A2DB056CB9A2DB056479A206FA2B2130B21305E17079
  94. E6084E2050274605F4353158185230C541679E6084E205027464585453158179
  95. 470B2130B2130D9D204423079470B2130B21308BE40D9D20C2A20320000527F6
  96. 365646572756021424F4254558B2127F0679470B2130B2130CB24"
  97. END_ASC
  98.  
  99. BYTES: #42BCh 376.5
  100.  
  101. BEGIN_UU find2.uue
  102. begin 644 FIND2
  103. M2%!(4#0X+42=+5"A&%Y.T-D"^3\P``0-0'`!!"%`0*<",$T#TS0P30/3-#!-,
  104. MLQ(#T'2`Y`(&<F1.04U%+"KP``!&:6YD.M]50*QCQ#J67@7Y/P"L`^\_0/1"%
  105. MV!K6V0*TH@)>84@N4"!'-I6DA>0"!7)D4$]32"Y0($=&A46EMQ@2CQ&1`A,Q&
  106. MU=D"6#(`7V$E%H88`[83=CYA=*G2"V6\J=(+972I`O8JHG&0_P/G$V8[8?>4,
  107. M`=X#Y#S@'@>=+=#9`H@Q`&!AZHS!N6(1*1```)PKU@X%B#'`=605%A:E!5P4U
  108. MU@X%45JP4!EQJ(*M89TMX$!AX!6V$@.=+>!`8?`5MA(#2"Y@($?F%-149#MA;
  109. MYQ-&ERJ]4,:;*KU01I<J8*^R$@,K,5`>!Y=N@.0"!7)D4$]3$X6!)0-<%';I-
  110. M!D@N4"!'1H5%-5$8EW2P$@,K,=#9`D0R<$D'*S&P$@.X3M#9`BPJ,`(`4')OM
  111. 98V5D=7)E($%"3U)4A2LA]V"7=+`2`RLQ`"LQ5
  112. ``
  113. end
  114. sum -r/size 47150/566 section (from "begin" to "end")
  115. sum -r/size 7683/385 entire input file
  116. END_UU
  117.