section 519(1)

SECTION WORDING

519(1) Where a justice makes an order under subsection 515(1), (2), (7) or (8), (a) if the accused thereupon complies with the order, the justice shall direct that the accused be released (i) forthwith, if the accused is not required to be detained in custody in respect of any other matter, or (ii) as soon thereafter as the accused is no longer required to be detained in custody in respect of any other matter; and (b) if the accused does not thereupon comply with the order, the justice who made the order or another justice having jurisdiction shall issue a warrant for the committal of the accused and may endorse thereon an authorization to the person having the custody of the accused to release the accused when the accused complies with the order (i) forthwith after the compliance, if the accused is not required to be detained in custody in respect of any other matter, or (ii) as soon thereafter as the accused is no longer required to be detained in custody in respect of any other matter and if the justice so endorses the warrant, he shall attach to it a copy of the order.