Normally if you find yourself needing something like that, it means a CAS loop is the wrong tool for the job.