I want to make a programming procedure a bit more compact if possible:
I have the following code:
but want to reduce to a singal line:Code:available = QUEUE_SIZE - sendQ.count; if(available < length) copySize = available; else copySize = length;
All I want is that the variable copySize always land a value between 0 and (QUEUE_SIZE - sendQ.count).Code:copySize = ???
is it possible?