"The memory and both integer and boolean stacks are persistent during a single cycle. It means, that if you leave a value in a stack in one gene, it will be still there when you enter the next gene. "
This is not strictly correct for the boolean stack. As you say, there are no implicit operators on the integer stack. It takes explicit DNA commands to push and pop from the stack and gene boundaries do not have implicit meaning other than marking the boundaries of non-coding regions within which push and pop operations are ignroed.
But gene boundaries implicitly operate on the boolean stack. A cond statement clears the boolean stack for example (a clear stack is implicitly true). A start statement is an implicit AND of all arguments on the boolean stack.
Private Function ExecuteFlowCommands(n As Integer) As Boolean
'returns true if a stop command was found (start, stop, or else)
'returns false if cond was found
ExecuteFlowCommands = False
Select Case n
Case 1 'cond
CurrentFlow = COND
' Clear the boolean stack
Condst.pos = 0
Condst.val(0) = 0
Exit Function
Case 2, 3, 4 'assume a stop command, or it really is a stop command
'this is supposed to come before case 2 and 3, since these commands
'must be executed before start and else have a chance to go
ExecuteFlowCommands = True
If CurrentFlow = COND Then CurrentCondFlag = AddupCond
CurrentFlow = CLEAR
Select Case n
Case 2 'start
If CurrentCondFlag = NEXTBODY Then CurrentFlow = body
currgene = currgene + 1
Case 3 'else
If CurrentCondFlag = NEXTELSE Then CurrentFlow = ELSEBODY
currgene = currgene + 1
End Select
End Select
End Function