-- title: goto to build multiple if -- topics: if, goto --**************************** n=0 if n==1 then print(1111) elseif n==2 then print(2222) elseif n==3 then print(3333) elseif n==4 then print(4444) else print('????') end print('quitting from elseif code-section') --**************************** n=3 if n==1 then print(1111) goto prosecution end if n==2 then print(2222) goto prosecution end if n==3 then print(3333) goto prosecution end if n==4 then print(4444) goto prosecution end print('????') :: prosecution :: print('quitting from if-goto code-section') -- additionally: table-based print("table based") table1={1111,2222,3333,4444} print(table1[n] or '????')