create_array = function () -> p p >>= ("a", "b", "c"); end array = create_array(); array >> # 3A returned pointer provides piece of data that does not belong to the local storage of any function. Therefore several functions can work on the same data by obtaining pointers to the data.
When a function call is terminated, the values of all the local variables are lost. Therefore pointer to a local variable should not be returned. For example, the following function
create_array = function () -> p array = ("a", "b", "c"); p = >>array endis bad since the return value will not be usable. The function will compile fine. But when the return value is accessed, an error will occur
array = create_array(); array >> # 3