Skip to content

Commit

Permalink
clarify lists
Browse files Browse the repository at this point in the history
  • Loading branch information
RemieRichards committed Jan 30, 2016
1 parent 654547d commit 48dbbad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ Math operators like +, -, /, *, etc are up in the air, just choose which version
Like all languages, Dream Maker has its quirks, some of them are beneficial to us, like these

* In-To for loops: ```for(var/i = 1, i <= some_value, i++)``` is a fairly standard way to write an incremental for loop in most languages (especially those in the C family) however DM's ```for(var/i in 1 to some_value)``` syntax is oddly faster than its implementation of the former syntax; where possible it's advised to use DM's syntax. (Note, the ```to``` keyword is inclusive, so it automatically defaults to replacing ```<=```, if you want ```<``` then you should write it as ```1 to some_value-1```).
HOWEVER, if either ```some_value``` or ```i``` changes within the body of the for (underneath the for(...) header) then you can NOT use this type of for loop!
HOWEVER, if either ```some_value``` or ```i``` changes within the body of the for (underneath the for(...) header) or If you are looping over a list AND changing the length of the list then you can NOT use this type of for loop!


* Istypeless for loops: a name for a differing syntax for writing for-each style loops in DM, however it is NOT DM's standard syntax hence why this is considered a quirk. Take a look at this:
```
Expand Down

0 comments on commit 48dbbad

Please sign in to comment.