diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-06-13 15:59:50 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-06-13 15:59:50 -0700 |
commit | a56e7c7508da298c92700251a500e06701d59c08 (patch) | |
tree | 7762443db9ed472e53984abe804b4227cff2f10c /contrib | |
parent | 90f6765cdf77c1414726d899f00c77da43f45758 (diff) |
updates to the external StartOzServer.oz script
the author of these changes is Torsten Anders
* contrib/scripts/StartOzServer.oz (MyStream):
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/scripts/StartOzServer.oz | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/contrib/scripts/StartOzServer.oz b/contrib/scripts/StartOzServer.oz index 4d5144e20..56940a37e 100644 --- a/contrib/scripts/StartOzServer.oz +++ b/contrib/scripts/StartOzServer.oz @@ -60,7 +60,7 @@ MyCompiler = Emacs.condSend.compiler {MyCompiler enqueue(setSwitch(expression true))} {Browse {MyCompiler enqueue(feedVirtualString( - {LUtils.accum ["try\n" + {Accum ["try\n" % "skip\n" % do something in any case.. "1 div 0" % my code % "1" % my code @@ -188,7 +188,7 @@ thread proc {$ Code} Result %% Catch any exception (so the will not cause blocking) and return nil in that case - FullCode = {LUtils.accum ["try\n" + FullCode = {Accum ["try\n" % "skip\n" % do something in any case.. Code "\ncatch E then {Error.printException E}\n" @@ -198,7 +198,7 @@ thread in %% ?? Should I make setting switches etc atomic? {MyCompiler enqueue(setSwitch(expression true))} - Result = {MyCompiler enqueue(feedVirtualString(FullCode return(result: $)))} + {MyCompiler enqueue(feedVirtualString(FullCode return(result: ?Result)))} {MyCompiler enqueue(setSwitch(expression false))} %% {Wait Result} @@ -212,6 +212,17 @@ end +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% Aux defs +%% + +/** %% Binds the accumulation of the binary function Fn on all neighbors in Xs to Y. E.g., Accum returns the sum in Xs if Fn is Number.'+'. +%% */ +proc {Accum Xs Fn Y} + {List.foldL Xs.2 Fn Xs.1 Y} +end + |