--- a/Workspace.st Thu Nov 03 15:40:29 2016 +0100
+++ b/Workspace.st Thu Nov 03 22:37:24 2016 +0100
@@ -484,6 +484,24 @@
"Created: / 20-04-2005 / 11:57:53 / cg"
!
+rememberResultAsWorkspaceVariable:lastResult
+ "remember some last result as _0,
+ and shift the previous results (i.e. _0 -> _1 -> .. _9)"
+
+ |workspaceVariables|
+
+ workspaceVariables := self workspaceVariables.
+
+ 9 to:1 by:-1 do:[:h|
+ (workspaceVariables includesKey:('_%1' bindWith:h-1)) ifTrue:[
+ workspaceVariables
+ at:('_%1' bindWith:h)
+ put:(workspaceVariables at:('_%1' bindWith:h-1)).
+ ].
+ ].
+ workspaceVariables at:'_0' put:(ValueHolder with:lastResult).
+!
+
removeAllWorkspaceVariables
"delete all workspace variables"