diff options
| author | Tyge Løvset <[email protected]> | 2022-09-26 08:08:47 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-09-26 08:08:47 +0200 |
| commit | ca01dd726e2ed8f8b69f8ff08855e80f4eea7247 (patch) | |
| tree | 0ce1594c39d18a93212f066fd8c3c2477fc6f22b /examples/priority.c | |
| parent | ad5be4349232bbba96c0974bc2693ec7331c4b12 (diff) | |
| download | STC-modified-ca01dd726e2ed8f8b69f8ff08855e80f4eea7247.tar.gz STC-modified-ca01dd726e2ed8f8b69f8ff08855e80f4eea7247.zip | |
DEPRECATED: c_forrange(): replaced with c_forloop(). This uses 'long long' as iter type, i.e. "%lld" printf format.
crange_from() renamed to crange_make().
More docs.
Diffstat (limited to 'examples/priority.c')
| -rw-r--r-- | examples/priority.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/priority.c b/examples/priority.c index d801c118..452ed9d4 100644 --- a/examples/priority.c +++ b/examples/priority.c @@ -16,18 +16,18 @@ int main() { { // Push ten million random numbers to priority queue printf("Push %" PRIuMAX " numbers\n", N); - c_forrange (N) + c_forloop (N) cpque_i_push(&heap, stc64_uniform(&rng, &dist)); // push some negative numbers too. c_forlist (i, int, {-231, -32, -873, -4, -343}) cpque_i_push(&heap, *i.ref); - c_forrange (N) + c_forloop (N) cpque_i_push(&heap, stc64_uniform(&rng, &dist)); puts("Extract the hundred smallest."); - c_forrange (100) { + c_forloop (100) { printf("%" PRIdMAX " ", *cpque_i_top(&heap)); cpque_i_pop(&heap); } |
