Bonjour et bienvenue Olivier,
Yes there is many different way. If you have multiple choice on multiple var it's a little bit more coding on your side. BUT if you have multiple conditions to test on a single var, and then jump to a specific routine, you have at least 3 choices
1. few IF THEN
SELECT CASECode:Choix VAR BYTE Start: ' ' some code here ' IF Choix=1 then gosub Routine1 IF Choix=2 then gosub Routine2 IF Choix=3 then gosub Routine3 goto start Routine1: ' ' plah plah plah ' return Routine2: ' ' plah plah plah ' return Routine3: ' ' plah plah plah ' return
BRANCHLCode:Choix VAR BYTE Start: ' ' some code here ' SELECT CASE CHOIX CASE 1 gosub Routine1 ' CASE 2 gosub Routine2 ' CASE 3 gosub Routine3 ' END SELECT goto start Routine1: ' ' plah plah plah ' return Routine2: ' ' plah plah plah ' return Routine3: ' ' plah plah plah ' return
but this one AS-IS, use GOTO, so, as Henrik said, you can't use RETURN without tricks
Code:Choix VAR BYTE Start: ' ' some code here ' ' choix= 0 1 2 3 ' ' ' ' ' branchl choix,[Start,Routine1, Routine2, Routine3] goto start Routine1: ' ' plah plah plah ' goto start Routine2: ' ' plah plah plah ' goto start Routine3: ' ' plah plah plah ' goto start




Bookmarks