| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ASCIISearchClass > AsciiSearchClass Methods >====== Ask (solicit search specifications) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[asciisearchclass methods.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[init initialize the asciisearchclass object .htm|{{btn_next_n.gif|Next page}}]] | | || **Ask( **[//startline//]// //**), VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} | **Ask** | Prompts the end user for search specifications then positions to the specified search value. | | //startline// | The offset or position of the line at which to begin the search, typically the current line position. If omitted, //startline //defaults to one (1). | The **Ask **method prompts the end user for search specifications then positions the file to the next line subject to the search specifications, or issues an appropriate message if the search value is not found. **Implementation:** The Ask method prompts the end user for search specifications including a value to search for, the direction of the search, and whether the search is case sensitive. If the user invokes the search (doesn't cancel), the Ask method positions the file to the next line containing the search value, or issues an appropriate message if the search value is not found. **Example:** ** ACCEPT** **  CASE FIELD()** **  OF ?PrintButton** **   IF EVENT() = EVENT:Accepted** **    IF ViewerActive THEN Viewer.Printer.Ask.** **   END** **  OF ?Search                         !on "search" button** **   IF EVENT() = EVENT:Accepted** **    IF ViewerActive                  !call Searcher.Ask method** **     StartSearch=CHOOSE(CHOICE(?AsciiBox)>0, |! passing the currently** **     Viewer.TopLine+CHOICE(?AsciiBox)-1,1)    ! selected line as the** **     Viewer.Searcher.Ask(StartSearch)         ! search's starting point** **    END** **   END** **  END** ** END**