Hi,
The case statement below doesn't get executed when Action contains "a". Processing action a gets logged, but then nothing for the actual case for "a".
Have I got something wrong here?
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			The case statement below doesn't get executed when Action contains "a". Processing action a gets logged, but then nothing for the actual case for "a".
Have I got something wrong here?
			
				B4X:
			
		
		
		    Private FST() As Byte = Array As Byte (4,2,0,0,0,0,5,3,1,0,0,0,6,0,2,0,0,0,0,0,0,0,1,1,0,0,0,0,6,0,0,0,0,01,0)
    Private FST_A() As Byte = "ea    faa   g a      dcb    g     b "
    Private FST_State As Byte
...
...
Sub FST_Process (Event As Byte)
Dim NewState As Byte
Dim Action As Byte
    Log ("Current state = ", FST_State," Event = ", Event)
    NewState = FST((FST_State-1)*6+Event-1)
    Action = FST_A((FST_State-1)*6+Event-1)
    Log ("NewState = ", NewState, " Action = ", Array As Byte(Action))
    If NewState <> 0 Then
        FST_State = NewState   
    End If
    If Action <> " " Then
        Log ("Processing action ",Array As Byte(Action))
        Select Case Action
            Case "a"
                Log ("Cursor = ", MyCursor)
                If Event = 2 Then
                    MyCursor = MyCursor + 1
                Else
                    MyCursor = MyCursor - 1
                End If
                Log ("Cursor = ", MyCursor)
                Cursor(MyCursor)
            Case "b"
            Case "c"
            Case "d"
            Case "e"
            Case "f"
            Case "g"
        End Select
    End If
End Sub 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		