In Revolution a stack file that is stored on disk contains a single main stack. If the stack file is accessed in your program then the main stack and it's substacks are loaded into memory. There are various ways to access a stack file. The following examples will all load the main stack in a stack file into memory:
put the uVersion of stack "/path/to/stack.rev" into theVersion
go stack "/path/to/stack.rev"
put there is a stack "/path/to/stack.rev" into theStackExists
Below you will find a function that will the name of all stacks that are currently loaded in memory.
function StacksInMemory
local theStack,theStacksInMemory,theSubstack
repeat for each line theStack in the mainstacks
put theStack & cr after theStacksInMemory
repeat for each line theSubstack in the substacks of stack theStack
put theSubstack & cr after theStacksInMemory
end repeat
end repeat
delete the last char of theStacksInMemory
return theStacksinMemory
end StacksInMemory
Comments (0)
Add your comment