Download this file
1 2 3 4 5 6
IF KeysPoolFreeIndex <= UPPER_BOUND(KeysPool,1) THEN ClaimNextFreeKey := KeysPool[KeysPoolFreeIndex]; KeysPoolFreeIndex := KeysPoolFreeIndex +1; ELSE eError := ERROR.PayloadNotEnoughKeysPool; END_IF