Function with timing control

In reply to dave_59:

If I use task I can’t use statements like “data_read <= rdata (addr);” in my initial block because task cannot return a value. I should be using something like “rdata (addr, data_read);”
Is this the only work-around?