/* Run tree organization in the cloud "Clouder.!?" "Attempt to Cloud Both" "Exec" % "ider --> clouded" ' % % stake the cloud region with our claims % dup Clouder.!A dup Clouder.!B % % do we control the cloud % dup Clouder.? { % % we control the cloud, check a second time % dup Clouder.? { % % for certain we have claimed the cloud % true } { % % the backup claim has failed % release our cloud claims % dup Clouder./ false } ifelse } { % % cannot lock cloud, unclaim our cloud locks % dup Clouder./ false } ifelse pop2nd ' newdef "Clouder./" "Uncloud Both Our Clouds" "Exec" % "ider -->" ' % % delete wildcard of our cloud claimants % ^"?_" &".lok" ofcloud delfiles ' newdef "Clouder.//" "Uncloud All Clouds" "Exec" % "-->" ' % % clear all claimnats from cloud % "?_*.lok" ofcloud delfiles ' newdef "Clouder.?" "Are Both Clouded" "Exec" % "ider --> both-clouded" " % % are both cloud claimants our claim % dup Clouder.A? exch Clouder.B? and " newdef "Clouder.A?" "Is A Clouded" "Exec" % "ider --> clouded" ' % % is there an A cloud claimant % "A" Clouder.#? ' newdef "Clouder.B?" "Is B Clouded" "Exec" % "ider --> clouded" ' % % is there a B cloud claimant % "B" Clouder.#? ' newdef "Clouder._#" "Number of Clouds" "Exec" % %%% "cltype --> clouds" ' % % number of claimants % &"_*.lok" !wilder 0 empty ofxact empty { nextfile ? rot + tuck } loop filing) ' newdef "Clouder.#?" "Is Cloud Valid" "Exec" % "ider cltype --> clouded" ' % % verify our unique cloud claimant exists % dup Clouder._# 1 eq { &"_" ^ &".lok" ofxact exists } { pop2 false } ifelse ' newdef "Clouder./?" "Are Both Unclouded" "Exec" % "--> both-unclouded" ' % % insure count of both types of claimant is zero % "A" Clouder._# 0 eq "B" Clouder._# 0 eq and ' newdef "Clouder.!A" "Cloud A" "Exec" % "ider -->" ' % % set our A claim % "A" Clouder.! ' newdef "Clouder.!B" "Cloud B" "Exec" % "ider -->" ' % % set our B claim % "B" Clouder.! ' newdef "Clouder.!" "Cloud Type" "Exec" % "ider cltype -->" ' % % set claim in cloud slot % &"_" ^ &".lok" ofcloud "true !Cloud.Locked" &; exch write ' newdef Apex Status.txt Proc.txt -LevelAa -LevelAb -LevelAc */