User Key: Custom Menu

+- HP Forums (http://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: User Key: Custom Menu (/thread-9430.html)



RE: User Key: Custom Menu - Tyann - 11-25-2017 10:59 PM

Bonjour
Pour le nouveau firmware Je vous propose une amélioration qui permet de quitter sans faire de choix avec 'ESC'


Hello
For the new firmware I propose an improvement that allows you to leave without making a choice with 'ESC'

Code:

// a custom menu
// 2017 EWS

KEY K_Templ()
BEGIN
LOCAL r,str,lst,cst,ch;
// templates
lst:={"Function.ROOT()",
"Function.AREA()",
"Function.SLOPE()",
"Finance.TvmNbPmt()",
"Finance.TvmIPYR()",
"Finance.TvmPV()",
"Finance.TvmPMT()",
"Finance.TvmFV()"};


// choose list
cst:={"ROOT",
"AREA",
"SLOPE",
"N",
"I%YR",
"PV",
"PMT",
"FV"};

r:=CHOOSE(ch,"Template",cst);
IF r THEN
 RETURN lst(ch);
ELSE
 RETURN -1;
END;
END;