src/ets.php
function add_system_var(&$datatree, $index, $last, $key)
	{
		$datatree->_key = $key;
		$datatree->_index = $index;
		$datatree->_rank = $index + 1;
		$datatree->_odd = $datatree->_not_even = (1 == $datatree->_rank % 2);
		$datatree->_even = $datatree->_not_odd = (0 == $datatree->_rank % 2);
		$datatree->_first = (0 == $index);
		$datatree->_middle = !$datatree->_first && !$last;
		$datatree->_last = $last;
		$datatree->_not_first = !$datatree->_first;
		$datatree->_not_last = !$last;
		$datatree->_not_middle = !$datatree->_middle;
	}
function add_system_var(&$datatree, $index, $last, $key)
	{
		$datatree->_key = $key;
		$datatree->_index = $index;
		$datatree->_rank = $index + 1;
		$datatree->_odd = $datatree->_not_even = (1 == $datatree->_rank % 2);
		$datatree->_even = $datatree->_not_odd = (0 == $datatree->_rank % 2);
		$datatree->_first = (0 == $index);
		$datatree->_middle = !$datatree->_first && !$last;
		$datatree->_last = $last;
		$datatree->_not_first = !$datatree->_first;
		$datatree->_not_last = !$last;
		$datatree->_not_middle = !$datatree->_middle;
	}
function add_system_var ( & $ datatree , $ index , $ last , $ key ) { $ datatree -> _key = $ key ; $ datatree -> _index = $ index ; $ datatree -> _rank = $ index + 1 ; $ datatree -> _odd = $ datatree -> _not_even = ( 1 == $ datatree -> _rank % 2 ) ; $ datatree -> _even = $ datatree -> _not_odd = ( 0 == $ datatree -> _rank % 2 ) ; $ datatree -> _first = ( 0 == $ index ) ; $ datatree -> _middle = ! $ datatree -> _first && ! $ last ; $ datatree -> _last = $ last ; $ datatree -> _not_first = ! $ datatree -> _first ; $ datatree -> _not_last = ! $ last ; $ datatree -> _not_middle = ! $ datatree -> _middle ; }
Add system variables to an object
Add system variables to an object