summaryrefslogtreecommitdiffhomepage
path: root/examples/queue.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-10-19 15:50:51 +0200
committerTyge Løvset <[email protected]>2022-10-19 15:50:51 +0200
commit0441f3844410c64b7e2d4a2604b4254b851e64c8 (patch)
tree2b30f21536fd589b890fa4644732e963036a9113 /examples/queue.c
parentbb3a457e5c2c9e6b069ab3dfba10f9d21686b035 (diff)
downloadSTC-modified-0441f3844410c64b7e2d4a2604b4254b851e64c8.tar.gz
STC-modified-0441f3844410c64b7e2d4a2604b4254b851e64c8.zip
Reverted back to c_forrrange from c_forloop. Still available but deprecated.
Diffstat (limited to 'examples/queue.c')
-rw-r--r--examples/queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/queue.c b/examples/queue.c
index cf75615c..cdf4cdb3 100644
--- a/examples/queue.c
+++ b/examples/queue.c
@@ -14,12 +14,12 @@ int main() {
c_auto (cqueue_i, queue)
{
// Push ten million random numbers onto the queue.
- c_forloop (n)
+ c_forrange (n)
cqueue_i_push(&queue, stc64_uniform(&rng, &dist));
// Push or pop on the queue ten million times
printf("%d\n", n);
- c_forloop (n) { // forrange uses initial n only.
+ c_forrange (n) { // forrange uses initial n only.
int r = stc64_uniform(&rng, &dist);
if (r & 1)
++n, cqueue_i_push(&queue, r);