comparison interps/clc-intercal/CLC-INTERCAL-Docs-1.-94.-2/doc/examples/quantum/stash.i @ 996:859f9b4339e6

<Gregor> tar xf egobot.tar.xz
author HackBot
date Sun, 09 Dec 2012 19:30:08 +0000
parents
children
comparison
equal deleted inserted replaced
995:6883f5911eb7 996:859f9b4339e6
1 PLEASE NOTE: this program demonstrates quantum stash.
2
3 Requires CLC-INTERCAL 1.-94 or newer.
4
5 Copyright (c) 2006 Claudio Calvelli, all rights reserved.
6
7 CLC-INTERCAL is copyrighted software. However, permission to use, modify,
8 and distribute it is granted provided that the conditions set out in the
9 licence agreement are met. See files README and COPYING in the distribution.
10
11 DO .1 <- #1
12 DO STASH .1
13 DO .1 <- #2
14 DO STASH .1 WHILE NOT STASHING IT
15 DO .1 <- #3
16 DO RETRIEVE .1
17 DO READ OUT .1
18
19 PLEASE NOTE: There is (apparently) a race condition in which two
20 superposed states attempt to retrieve .1 at the same time, but
21 the stash depth at the time of retrieving is not uniquely determined
22 (it can be one or two). We don't quite know what happens until we
23 force the two states to collapse by looking at it (with the READ OUT).
24
25 DO GIVE UP
26