Progress
Language Tutorial
for Character


Using SHARED Resources

In the tutorial, you learned about SHARED variables. SHARED variables allow you to set aside an area in memory that is accessible by each procedure that defines the SHARED variable. The SHARED variable is available to all of these procedures, as long as the procedure context that initially created the SHARED variable is still available.

Progress provides the SHARED option for most resources. You can have SHARED variables, frames, buffers, queries, and streams. To implement a SHARED resource, see the Progress Language Reference for the appropriate syntax.

The advantage of SHARED resources is that they promote sharing resources and communicating data between application modules. SHARED resources also take a little less time to resolve at startup.

The disadvantage of SHARED resources is that they are not explicit and therefore not very portable. Since SHARED resources are available for both input and output operations, it may not be immediately clear to another programmer how a particular module interacts with the shared resource.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095