The order of the VTagEntered/VTagExited events are very interesting:
VTagEntered: Compare(j,j+1)
VTagEntered: Swap(j,j+1)
VTagExited: Swap(0,1)
VTagExited: Compare(0,1)
The Swap's events are embedded in between the VTagEntered/VTagExited events of Compare.
Since the client code should play the animation of Compare firstly, and play the Swap animation secondly, how can the client code play the two animations in correct order given the parameter values of Swap arrive first via VTagExited: Swap(0,1) and the parameter values of Compare arrive secondly via VTagExited: Compare(0,1)?
Can the V-tag parameter values be evaluated when VTagEntered event is sent out?
Or, can the client code evaluate the values of j and j+1 when VTagEntered event is received?
After https://github.com/SeedV/SeedLang/pull/191 was merged, the order of V-tag notifications for a bubble sort algorithm look like the following output:
Code:
The output of SeedLang:
The order of the VTagEntered/VTagExited events are very interesting:
The
Swap
's events are embedded in between the VTagEntered/VTagExited events ofCompare
.Since the client code should play the animation of
Compare
firstly, and play theSwap
animation secondly, how can the client code play the two animations in correct order given the parameter values ofSwap
arrive first viaVTagExited: Swap(0,1)
and the parameter values ofCompare
arrive secondly viaVTagExited: Compare(0,1)
?j
andj+1
when VTagEntered event is received?