diff options
| author | Tyge Løvset <[email protected]> | 2022-07-31 13:03:32 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-07-31 13:03:32 +0200 |
| commit | bc3f6613ba44adcecacbdd106c840e8b6c054e22 (patch) | |
| tree | 9d1d72d8c207592cb25f4892222feaddd22c8b79 /docs | |
| parent | 8a5478f7c14d4c7476d36b137fd7d2c8d95f2c13 (diff) | |
| download | STC-modified-bc3f6613ba44adcecacbdd106c840e8b6c054e22.tar.gz STC-modified-bc3f6613ba44adcecacbdd106c840e8b6c054e22.zip | |
VERSION 3.9: API change in c_forrange() with >= 3 args. csview updates.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ccommon_api.md | 12 | ||||
| -rw-r--r-- | docs/clist_api.md | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 82431d95..1a9fb30e 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -151,19 +151,19 @@ Declare an iterator and specify a range to iterate with a for loop. Like python' | Usage | Python equivalent | |:----------------------------------------------|:-------------------------------------| | `c_forrange (stop)` | `for _ in range(stop):` | -| `c_forrange (i, stop) // IterType = size_t` | `for i in range(stop):` | -| `c_forrange (i, IterType, stop)` | `for i in range(stop):` | -| `c_forrange (i, IterType, start, stop)` | `for i in range(start, stop):` | -| `c_forrange (i, IterType, start, stop, step)` | `for i in range(start, stop, step):` | +| `c_forrange (i, stop) // IntType = size_t` | `for i in range(stop):` | +| `c_forrange (IntType, i, stop)` | `for i in range(stop):` | +| `c_forrange (IntType, i, start, stop)` | `for i in range(start, stop):` | +| `c_forrange (IntType, i, start, stop, step)` | `for i in range(start, stop, step):` | ```c c_forrange (5) printf("x"); // xxxxx c_forrange (i, 5) printf(" %" PRIuMAX "", i); // 0 1 2 3 4 -c_forrange (i, int, -3, 3) printf(" %d", i); +c_forrange (int, i, -3, 3) printf(" %d", i); // -3 -2 -1 0 1 2 -c_forrange (i, int, 30, 0, -5) printf(" %d", i); +c_forrange (int, i, 30, 0, -5) printf(" %d", i); // 30 25 20 15 10 5 ``` diff --git a/docs/clist_api.md b/docs/clist_api.md index 17ee3fa8..e870c8c6 100644 --- a/docs/clist_api.md +++ b/docs/clist_api.md @@ -113,7 +113,7 @@ int main() { 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0 }); - c_forrange (i, int, 1, 10) { + c_forrange (int, i, 1, 10) { if (i & 1) clist_d_push_front(&list, (float) i); else clist_d_push_back(&list, (float) i); } |
