Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
MenuPrime
Créé
il y a 4 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
1 suppression
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
114 lignes
Copier tout
0 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
114 lignes
Copier tout
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
//
//
// Originally intemded to display "Program"->"Edit"->"Cmds" tree
// Originally intemded to display "Program"->"Edit"->"Cmds" tree
// directly in CAS or HOME without program editing.
// directly in CAS or HOME without program editing.
//
//
// usage:
// usage:
// - called with <Shift>+<User> plus <Alpha><Shift><Space>
// - called with <Shift>+<User> plus <Alpha><Shift><Space>
// (2 times <Shift>+<User> keeps user key mode active)
// (2 times <Shift>+<User> keeps user key mode active)
// - <enter>, <OK> or touch on a command in main or sub menu returns selected item
// - <enter>, <OK> or touch on a command in main or sub menu returns selected item
// - <Esc> in main menu will close popup
// - <Esc> in main menu will close popup
// <Esc> in sub menu will return to main menu entry
// <Esc> in sub menu will return to main menu entry
// - <up>, <down> and swipe to move in popup (<left><right> are NOT usable)
// - <up>, <down> and swipe to move in popup (<left><right> are NOT usable)
// - starts with last returned sub- or mainmenu entry selected
// - starts with last returned sub- or mainmenu entry selected
// starts last visited submenu selected when ended with <Esc>
// starts last visited submenu selected when ended with <Esc>
// - adopt 'menuList' to your needs. Remove 'menuAct' and 'menuList' from this code,
// - adopt 'menuList' to your needs. Remove 'menuAct' and 'menuList' from this code,
// when you want to use different menus in different Apps.
// when you want to use different menus in different Apps.
//
//
// 'menuList' contains the menu definition in a list. Each entry is described by a
// 'menuList' contains the menu definition in a list. Each entry is described by a
// sub list with text to display as the 1st and text to return as 2nd entry.
// sub list with text to display as the 1st and text to return as 2nd entry.
// When the 2nd value is again a list, the entry is interpreted as a submenu containing
// When the 2nd value is again a list, the entry is interpreted as a submenu containing
// the sublist entries to display and return. A sample:
// the sublist entries to display and return. A sample:
// EXPORT menuList :=
// EXPORT menuList :=
// { { "display_text1", "output_text1" },
// { { "display_text1", "output_text1" },
// { "display_text2", "output_text2" },
// { "display_text2", "output_text2" },
// { "submenu1" , { "menu1_display_and_output1",
// { "submenu1" , { "menu1_display_and_output1",
// "menu1_display_and_output2",
// "menu1_display_and_output2",
// "menu1_display_and_output3"
// "menu1_display_and_output3"
// }
// }
// },
// },
// { "submenu2" , { "menu2_display_and_output1",
// { "submenu2" , { "menu2_display_and_output1",
// "menu2_display_and_output2"
// "menu2_display_and_output2"
// }
// }
// }
// }
// };
// };
//
//
// Stay healthy!
// Stay healthy!
// Frank P. Mar 2021
// Frank P. Mar 2021
// hisory:
// hisory:
// V 0.01 Feb 2019 - initial
// V 0.01 Feb 2019 - initial
// V 1.0 Mar 2021 - menuAct added to remember last choose
// V 1.0 Mar 2021 - menuAct added to remember last choose
// - menuList both display and return text as list of lists
// - menuList both display and return text as list of lists
// (inspired by ramon_ea1gth CSTMENU)
// (inspired by ramon_ea1gth CSTMENU)
//
//
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// { "km/l <-> l/100km", "kml()" },
// { "km/l <-> l/100km", "kml()" },
EXPORT menuAct := {1,0};
EXPORT menuAct := {1,0};
EXPORT menuList :=
EXPORT menuList :=
{ { "evalc" , "evalc()"
{ { "evalc" , "evalc()"
},{ "re" , "re()"
},{ "re" , "re()"
},{ "im" , "im()"
},{ "im" , "im()"
},{ "csolve" , "csolve()"
},{ "csolve" , "csolve()"
},{ "rectangular to polar" , "RectangularPolar()"
},{ "rectangular to polar" , "RectangularPolar()"
},{ "polar to rectangular" , "PolarRectangular()"
},{ "polar to rectangular" , "PolarRectangular()"
}
}
};
};
Copier
Copié
Copier
Copié
KEY KSA_Math
()
KEY KSA_Math
BEGIN
BEGIN
LOCAL choose_list, choose_title, ch, ret, i;
LOCAL choose_list, choose_title, ch, ret, i;
/////////////////////////// check the menu entries ///////////////////////////////////
/////////////////////////// check the menu entries ///////////////////////////////////
FOR i FROM 1 TO SIZE(menuList) STEP 1 DO
FOR i FROM 1 TO SIZE(menuList) STEP 1 DO
// 1st entry is a string and 2nd entry is a string or a list and 2nd entry not empty
// 1st entry is a string and 2nd entry is a string or a list and 2nd entry not empty
IF ( TYPE(menuList(i,1)) == 2 ) AND ( (TYPE(menuList(i,2)) == 2) OR ( TYPE(menuList(i,2)) == 6 ) ) AND SIZE(menuList(i,2)) THEN
IF ( TYPE(menuList(i,1)) == 2 ) AND ( (TYPE(menuList(i,2)) == 2) OR ( TYPE(menuList(i,2)) == 6 ) ) AND SIZE(menuList(i,2)) THEN
// OK
// OK
ELSE
ELSE
MSGBOX(" INVALID MENU ENTRY: " + STRING(menuList(i)) );
MSGBOX(" INVALID MENU ENTRY: " + STRING(menuList(i)) );
RETURN "";
RETURN "";
END;
END;
END;
END;
WHILE 1 DO
WHILE 1 DO
//////////////////////// prepare the choose arguments //////////////////////////////
//////////////////////// prepare the choose arguments //////////////////////////////
// string as 2nd argument => in main or a submenue entry and that is not active
// string as 2nd argument => in main or a submenue entry and that is not active
IF (TYPE(menuList(menuAct(1),2)) == 2) OR ( (TYPE(menuList(menuAct(1),2)) == 6) AND (menuAct(2) == 0) ) THEN
IF (TYPE(menuList(menuAct(1),2)) == 2) OR ( (TYPE(menuList(menuAct(1),2)) == 6) AND (menuAct(2) == 0) ) THEN
choose_list := MAKELIST(menuList(X,1), X,1,SIZE(menuList));
choose_list := MAKELIST(menuList(X,1), X,1,SIZE(menuList));
choose_title := "Commands";
choose_title := "Commands";
ch := menuAct(1);
ch := menuAct(1);
END;
END;
// at a submenue entry and it is active
// at a submenue entry and it is active
IF ( TYPE(menuList(menuAct(1),2)) == 6 ) AND (menuAct(2) > 0) THEN
IF ( TYPE(menuList(menuAct(1),2)) == 6 ) AND (menuAct(2) > 0) THEN
choose_list := menuList(menuAct(1),2);
choose_list := menuList(menuAct(1),2);
choose_title := menuList(menuAct(1),1);
choose_title := menuList(menuAct(1),1);
ch := menuAct(2);
ch := menuAct(2);
END;
END;
////////////////////////////// choose a menu entry //////////////////////////////////
////////////////////////////// choose a menu entry //////////////////////////////////
ret:=choose(ch,choose_title,choose_list);
ret:=choose(ch,choose_title,choose_list);
IF menuAct(2) == 0 THEN
IF menuAct(2) == 0 THEN
///////////////////////////// handle main level ///////////////////////////////////
///////////////////////////// handle main level ///////////////////////////////////
menuAct(1) := ch; // remember main selection
menuAct(1) := ch; // remember main selection
IF ret==0 THEN // choose ended with esc
IF ret==0 THEN // choose ended with esc
RETURN "";
RETURN "";
ELSE
ELSE
IF TYPE(menuList(menuAct(1),2)) == 2 THEN // a string as 2nd entry
IF TYPE(menuList(menuAct(1),2)) == 2 THEN // a string as 2nd entry
RETURN menuList(menuAct(1),2); // return selected entry
RETURN menuList(menuAct(1),2); // return selected entry
END;
END;
IF TYPE(menuList(menuAct(1),2)) == 6 THEN // a list as 2nd entry
IF TYPE(menuList(menuAct(1),2)) == 6 THEN // a list as 2nd entry
menuAct(2) := 1; // activate submenu
menuAct(2) := 1; // activate submenu
END;
END;
END; // something selected?
END; // something selected?
ELSE
ELSE
//////////////////////////////// and sub level ///////////////////////////////////
//////////////////////////////// and sub level ///////////////////////////////////
menuAct(2) := ch; // remember sub selection
menuAct(2) := ch; // remember sub selection
IF ret==0 THEN // no entry selected
IF ret==0 THEN // no entry selected
menuAct(2) := 0; // back to main level
menuAct(2) := 0; // back to main level
ELSE
ELSE
RETURN choose_list(menuAct(2)); // return with selection
RETURN choose_list(menuAct(2)); // return with selection
END;
END;
END; // in sub menu?
END; // in sub menu?
END; // while choosing
END; // while choosing
END; // menu
END; // menu
Différences enregistrées
Texte d'origine
Ouvrir un fichier
// -------------------------------------------------------------------------- // // Originally intemded to display "Program"->"Edit"->"Cmds" tree // directly in CAS or HOME without program editing. // // usage: // - called with <Shift>+<User> plus <Alpha><Shift><Space> // (2 times <Shift>+<User> keeps user key mode active) // - <enter>, <OK> or touch on a command in main or sub menu returns selected item // - <Esc> in main menu will close popup // <Esc> in sub menu will return to main menu entry // - <up>, <down> and swipe to move in popup (<left><right> are NOT usable) // - starts with last returned sub- or mainmenu entry selected // starts last visited submenu selected when ended with <Esc> // - adopt 'menuList' to your needs. Remove 'menuAct' and 'menuList' from this code, // when you want to use different menus in different Apps. // // 'menuList' contains the menu definition in a list. Each entry is described by a // sub list with text to display as the 1st and text to return as 2nd entry. // When the 2nd value is again a list, the entry is interpreted as a submenu containing // the sublist entries to display and return. A sample: // EXPORT menuList := // { { "display_text1", "output_text1" }, // { "display_text2", "output_text2" }, // { "submenu1" , { "menu1_display_and_output1", // "menu1_display_and_output2", // "menu1_display_and_output3" // } // }, // { "submenu2" , { "menu2_display_and_output1", // "menu2_display_and_output2" // } // } // }; // // Stay healthy! // Frank P. Mar 2021 // hisory: // V 0.01 Feb 2019 - initial // V 1.0 Mar 2021 - menuAct added to remember last choose // - menuList both display and return text as list of lists // (inspired by ramon_ea1gth CSTMENU) // // -------------------------------------------------------------------------- // { "km/l <-> l/100km", "kml()" }, EXPORT menuAct := {1,0}; EXPORT menuList := { { "evalc" , "evalc()" },{ "re" , "re()" },{ "im" , "im()" },{ "csolve" , "csolve()" },{ "rectangular to polar" , "RectangularPolar()" },{ "polar to rectangular" , "PolarRectangular()" } }; KEY KSA_Math() BEGIN LOCAL choose_list, choose_title, ch, ret, i; /////////////////////////// check the menu entries /////////////////////////////////// FOR i FROM 1 TO SIZE(menuList) STEP 1 DO // 1st entry is a string and 2nd entry is a string or a list and 2nd entry not empty IF ( TYPE(menuList(i,1)) == 2 ) AND ( (TYPE(menuList(i,2)) == 2) OR ( TYPE(menuList(i,2)) == 6 ) ) AND SIZE(menuList(i,2)) THEN // OK ELSE MSGBOX(" INVALID MENU ENTRY: " + STRING(menuList(i)) ); RETURN ""; END; END; WHILE 1 DO //////////////////////// prepare the choose arguments ////////////////////////////// // string as 2nd argument => in main or a submenue entry and that is not active IF (TYPE(menuList(menuAct(1),2)) == 2) OR ( (TYPE(menuList(menuAct(1),2)) == 6) AND (menuAct(2) == 0) ) THEN choose_list := MAKELIST(menuList(X,1), X,1,SIZE(menuList)); choose_title := "Commands"; ch := menuAct(1); END; // at a submenue entry and it is active IF ( TYPE(menuList(menuAct(1),2)) == 6 ) AND (menuAct(2) > 0) THEN choose_list := menuList(menuAct(1),2); choose_title := menuList(menuAct(1),1); ch := menuAct(2); END; ////////////////////////////// choose a menu entry ////////////////////////////////// ret:=choose(ch,choose_title,choose_list); IF menuAct(2) == 0 THEN ///////////////////////////// handle main level /////////////////////////////////// menuAct(1) := ch; // remember main selection IF ret==0 THEN // choose ended with esc RETURN ""; ELSE IF TYPE(menuList(menuAct(1),2)) == 2 THEN // a string as 2nd entry RETURN menuList(menuAct(1),2); // return selected entry END; IF TYPE(menuList(menuAct(1),2)) == 6 THEN // a list as 2nd entry menuAct(2) := 1; // activate submenu END; END; // something selected? ELSE //////////////////////////////// and sub level /////////////////////////////////// menuAct(2) := ch; // remember sub selection IF ret==0 THEN // no entry selected menuAct(2) := 0; // back to main level ELSE RETURN choose_list(menuAct(2)); // return with selection END; END; // in sub menu? END; // while choosing END; // menu
Texte modifié
Ouvrir un fichier
// -------------------------------------------------------------------------- // // Originally intemded to display "Program"->"Edit"->"Cmds" tree // directly in CAS or HOME without program editing. // // usage: // - called with <Shift>+<User> plus <Alpha><Shift><Space> // (2 times <Shift>+<User> keeps user key mode active) // - <enter>, <OK> or touch on a command in main or sub menu returns selected item // - <Esc> in main menu will close popup // <Esc> in sub menu will return to main menu entry // - <up>, <down> and swipe to move in popup (<left><right> are NOT usable) // - starts with last returned sub- or mainmenu entry selected // starts last visited submenu selected when ended with <Esc> // - adopt 'menuList' to your needs. Remove 'menuAct' and 'menuList' from this code, // when you want to use different menus in different Apps. // // 'menuList' contains the menu definition in a list. Each entry is described by a // sub list with text to display as the 1st and text to return as 2nd entry. // When the 2nd value is again a list, the entry is interpreted as a submenu containing // the sublist entries to display and return. A sample: // EXPORT menuList := // { { "display_text1", "output_text1" }, // { "display_text2", "output_text2" }, // { "submenu1" , { "menu1_display_and_output1", // "menu1_display_and_output2", // "menu1_display_and_output3" // } // }, // { "submenu2" , { "menu2_display_and_output1", // "menu2_display_and_output2" // } // } // }; // // Stay healthy! // Frank P. Mar 2021 // hisory: // V 0.01 Feb 2019 - initial // V 1.0 Mar 2021 - menuAct added to remember last choose // - menuList both display and return text as list of lists // (inspired by ramon_ea1gth CSTMENU) // // -------------------------------------------------------------------------- // { "km/l <-> l/100km", "kml()" }, EXPORT menuAct := {1,0}; EXPORT menuList := { { "evalc" , "evalc()" },{ "re" , "re()" },{ "im" , "im()" },{ "csolve" , "csolve()" },{ "rectangular to polar" , "RectangularPolar()" },{ "polar to rectangular" , "PolarRectangular()" } }; KEY KSA_Math BEGIN LOCAL choose_list, choose_title, ch, ret, i; /////////////////////////// check the menu entries /////////////////////////////////// FOR i FROM 1 TO SIZE(menuList) STEP 1 DO // 1st entry is a string and 2nd entry is a string or a list and 2nd entry not empty IF ( TYPE(menuList(i,1)) == 2 ) AND ( (TYPE(menuList(i,2)) == 2) OR ( TYPE(menuList(i,2)) == 6 ) ) AND SIZE(menuList(i,2)) THEN // OK ELSE MSGBOX(" INVALID MENU ENTRY: " + STRING(menuList(i)) ); RETURN ""; END; END; WHILE 1 DO //////////////////////// prepare the choose arguments ////////////////////////////// // string as 2nd argument => in main or a submenue entry and that is not active IF (TYPE(menuList(menuAct(1),2)) == 2) OR ( (TYPE(menuList(menuAct(1),2)) == 6) AND (menuAct(2) == 0) ) THEN choose_list := MAKELIST(menuList(X,1), X,1,SIZE(menuList)); choose_title := "Commands"; ch := menuAct(1); END; // at a submenue entry and it is active IF ( TYPE(menuList(menuAct(1),2)) == 6 ) AND (menuAct(2) > 0) THEN choose_list := menuList(menuAct(1),2); choose_title := menuList(menuAct(1),1); ch := menuAct(2); END; ////////////////////////////// choose a menu entry ////////////////////////////////// ret:=choose(ch,choose_title,choose_list); IF menuAct(2) == 0 THEN ///////////////////////////// handle main level /////////////////////////////////// menuAct(1) := ch; // remember main selection IF ret==0 THEN // choose ended with esc RETURN ""; ELSE IF TYPE(menuList(menuAct(1),2)) == 2 THEN // a string as 2nd entry RETURN menuList(menuAct(1),2); // return selected entry END; IF TYPE(menuList(menuAct(1),2)) == 6 THEN // a list as 2nd entry menuAct(2) := 1; // activate submenu END; END; // something selected? ELSE //////////////////////////////// and sub level /////////////////////////////////// menuAct(2) := ch; // remember sub selection IF ret==0 THEN // no entry selected menuAct(2) := 0; // back to main level ELSE RETURN choose_list(menuAct(2)); // return with selection END; END; // in sub menu? END; // while choosing END; // menu
Trouver la différence