Danke dir vielmals,
es funktioniert \/

Code:
Declare Sub Lauflicht
Declare Sub Allean
Declare Sub Nacheinander
Declare Sub Startrek

Dim Zustand As Byte
DIM tastealt as byte


Do


if pinb.0 = 1 and tastealt.0 = 0 then
            Incr Zustand


end if
   Tastealt = Pinb


 select case zustand
 case 0:     ' nix
 Case 1 : Gosub Lauflicht
 case 2:  gosub allean
 case 3:  gosub nacheinander
 case 4:  gosub startrek
 case else:
             zustand = 0   ' wieder von vorn
 end select
Nur werde ich daraus:

Code:
if pinb.0 = 1 and tastealt.0 = 0 then
            Incr Zustand


end if
   Tastealt = Pinb
nicht richtig schlau.