summaryrefslogtreecommitdiffhomepage
path: root/examples/stack.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-09-18 13:45:25 +0200
committerTyge Løvset <[email protected]>2020-09-18 13:45:25 +0200
commit404f7ea40aa7f3a6d6c3713a6e517a51f19558b7 (patch)
treeaed7d7728c950461c72c03873e92ac0db163e544 /examples/stack.c
parent4526ee4c4ad675fbcc79934cfdee2ad15ee5139e (diff)
downloadSTC-modified-404f7ea40aa7f3a6d6c3713a6e517a51f19558b7.tar.gz
STC-modified-404f7ea40aa7f3a6d6c3713a6e517a51f19558b7.zip
Minor, using a few c_forrange ().
Diffstat (limited to 'examples/stack.c')
-rw-r--r--examples/stack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stack.c b/examples/stack.c
index e514808d..a911e4a2 100644
--- a/examples/stack.c
+++ b/examples/stack.c
@@ -12,10 +12,10 @@ int main() {
cstack_i stack = cstack_i_init();
cstack_c chars = cstack_c_init();
- for (int i=0; i<100; ++i)
+ c_forrange (i, int, 100)
cstack_i_push(&stack, i*i);
- for (int i=0; i<90; ++i)
+ c_forrange (i, int, 90)
cstack_i_pop(&stack);
c_foreach (i, cstack_i, stack)