pub fn goto_page() {
    let ans = ask_string("(p) Page | (n) Note", "", true);
    if ans.is_empty() {
        return;
    }

    match &ans[..] {
        // Goto Page
        "p" => {
            let pn = parse_page_ans(&ask_string("Page #", "", true));
            if pn < 1 || pn > get_max_page_number() {
                return;
            }
            show_page(pn);
        }
        // Goto Note's Page
        "n" => {
            let nn = parse_note_ans(&ask_string("Note #", "", true));
            if nn < 1 || nn > g_get_notes_length() {
                return;
            }
            show_page(get_note_page(nn));
        }
        _ => {}
    }
}
// Go to a page or note's page
Go to a page or note's page
Go to a page or note ' s page
pub fn goto_page() {
    let ans = ask_string("(p) Page | (n) Note", "", true);
    if ans.is_empty() {
        return;
    }
    match &ans[..] {
        // Goto Page
        "p" => {
            let pn = parse_page_ans(&ask_string("Page #", "", true));
            if pn < 1 || pn > get_max_page_number() {
                return;
            }
            show_page(pn);
        }
        // Goto Note's Page
        "n" => {
            let nn = parse_note_ans(&ask_string("Note #", "", true));
            if nn < 1 || nn > g_get_notes_length() {
                return;
            }
            show_page(get_note_page(nn));
        }
        _ => {}
    }
}
pub fn goto_page ( ) { let ans = ask_string ( " " , " " , true ) ; if ans . is_empty ( ) { return ; } match & ans [ .. ] { // Goto Page " " => { let pn = parse_page_ans ( & ask_string ( " " , " " , true ) ) ; if pn < 1 || pn > get_max_page_number ( ) { return ; } show_page ( pn ) ; } // Goto Note's Page " " => { let nn = parse_note_ans ( & ask_string ( " " , " " , true ) ) ; if nn < 1 || nn > g_get_notes_length ( ) { return ; } show_page ( get_note_page ( nn ) ) ; } _ => { } } }
Go to a page or note's page
Go to a page or note ' s page