summaryrefslogtreecommitdiffhomepage
path: root/examples/list.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-09-20 00:08:42 +0200
committerTyge Løvset <[email protected]>2020-09-20 00:08:42 +0200
commit7d124bea3cc2d999f98acb2b9ee0f828a19c4e4f (patch)
treeec6cee64f415d2ef5eb6bfb3e0ee972e2477251c /examples/list.c
parent404f7ea40aa7f3a6d6c3713a6e517a51f19558b7 (diff)
downloadSTC-modified-7d124bea3cc2d999f98acb2b9ee0f828a19c4e4f.tar.gz
STC-modified-7d124bea3cc2d999f98acb2b9ee0f828a19c4e4f.zip
converted to c_forrange().
Diffstat (limited to 'examples/list.c')
-rw-r--r--examples/list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/list.c b/examples/list.c
index c2bfec55..e3e68ee4 100644
--- a/examples/list.c
+++ b/examples/list.c
@@ -12,7 +12,7 @@ int main() {
crand_rng64_t eng = crand_rng64_init(1234);
crand_uniform_f64_t dist = crand_uniform_f64_init(100.0f, n);
int m = 0;
- for (int i = 0; i < n; ++i)
+ c_forrange (i, int, n)
clist_fx_push_back(&list, crand_uniform_f64(&eng, &dist)), ++m;
double sum = 0.0;
printf("sumarize %d:\n", m);