1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-29 18:00:26 +00:00

Merge pull request #515 from uvtc/patch-3

C-style (hyphenate)
This commit is contained in:
Calvin Rose 2020-12-04 17:37:24 -06:00 committed by GitHub
commit f92b5d69c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -494,13 +494,13 @@
(error (string "unexpected loop verb " verb)))))
(defmacro forv
`Do a c style for loop for side effects. The iteration variable i
can be mutated in the loop, unlike normal for. Returns nil.`
``Do a C-style for-loop for side effects. The iteration variable `i`
can be mutated in the loop, unlike normal `for`. Returns nil.``
[i start stop & body]
(for-var-template i start stop 1 < + body))
(defmacro for
"Do a c style for loop for side effects. Returns nil."
"Do a C-style for-loop for side effects. Returns nil."
[i start stop & body]
(for-template i start stop 1 < + body))