Commit Graph

38 Commits

Author SHA1 Message Date
Kaushal Modi
ac8ab4c549 Clarify the use of the backwards index operator (^N) in tut1 (#14681)
* Clarify the use of the backwards index operator (^N) in tut1

For consistency:
- Do `[a .. ^b]` (notice spaces on both sides of `..`)
- Do `[c ..< d]` (notice spaces on both sides of `..<`)

Fixes https://github.com/nim-lang/Nim/issues/14671.

* tut1: Add a note that ^ template calls can be saved to consts
2020-06-19 10:22:48 -04:00
Kaushal Modi
e4ed19c12f [backport] tut1: Update the proc overloading examples (#13497) [skip ci] 2020-02-25 21:19:51 +01:00
Siegfried Ehret
a577a88c36 Fix typo (#13015) [backport] 2020-01-03 10:23:28 +01:00
Timothee Cour
8c19372690 [ci skip] docfix .. < => ..< (#12981) [backport] 2019-12-29 15:34:36 +01:00
Elliot Waite
5da27a891c Removing the mention of using discard for block comments (#12837) [backport]
* Remove mention of using `discard` for block comments

* Add a 32x32 alternate favicon
2019-12-08 20:16:17 +01:00
Jjp137
3ad48069d3 Fix word wrapping 2019-10-22 17:59:12 -07:00
Jjp137
93461aee34 Fix many broken links
Note that contrary to what docgen.rst currently says, the ids have
to match exactly or else most web browsers will not jump to the
intended symbol.
2019-10-22 17:59:12 -07:00
pietroppeter
89c37fada7 [doc/tut1] removed discard discussion in comments (#12352) 2019-10-08 09:08:38 +02:00
Simon Krauter
e2f99a2026 Update tut1: -d:release does not turn off *allruntime checks off anymore (#11492)
According to https://nim-lang.org/blog/2019/06/06/version-0200-released.html
"The -d:release switch now does not disable runtime checks anymore. "
2019-06-13 15:16:38 +02:00
Arne Döring
80992c7a12 introduce object before tuple in the tutorials (#10664) 2019-02-14 22:17:05 +01:00
Araq
6fd0a33265 Tutorial 1: Simplifiy the discription of enums; it is a tutorial, not a manual 2018-08-31 00:30:19 +02:00
Στέφανος
f87a91a3ec Fixed a minor typo (#8685) 2018-08-20 09:40:56 +02:00
Chris de Graaf
6eedac3207 Fix link to first class iterator docs (#8356) 2018-07-18 09:17:34 +02:00
mboratko
70664bd1a2 Changed tutorial documentation referring to 'constant' to 'immutable' (#8056)
* Changed tutorial documentation referring to 'constant' to 'immutable'

* Clarification regarding side-effect free procedures fo:r multiple assignments
2018-06-18 02:05:35 -04:00
Andreas Rumpf
d62fe7d538 update the documentation 2018-05-01 09:38:17 +02:00
Andreas Rumpf
5237ef4f52 update the documentation about the new strings/seqs behaviours 2018-04-29 08:14:00 +02:00
Andreas Rumpf
fc52dd6463 Tut 1: tiny improvements 2018-02-05 21:13:18 +01:00
smt
e7e0648829 Update two links in tutorial to compiler usage docs with updated page anchors
Seems like these class ids on the page were renamed to reflect their hierarchy but the tutorial links weren't pointing to them, this should fix that
2018-01-12 13:57:58 +00:00
Araq
21ffb3a706 tut1.rst makes use of the new ':test:' feature 2017-11-28 01:15:33 +01:00
Araq
c1782fac21 cleaned up tutorial 1 2017-11-26 01:07:01 +01:00
Mamy Ratsimbazafy
e7c09512d2 Documentation: directly use ref object + fields (#6598) 2017-11-15 22:01:28 +01:00
superfunc
248caaf27e Update docs on assignment operator (#6373) 2017-09-15 21:49:00 +02:00
Andreas Rumpf
44bd4d8774 fixes #6125 2017-07-22 17:20:33 +02:00
Andreas Rumpf
6ba9c2b119 fixes #6062 2017-07-09 12:09:25 +02:00
Mice Pápai
f5717490d9 tut1.rst: Fix alignment, Change Subrange to MySubrange for clarity (#5798)
* tut1.rst: Fix alignment

* tut1.rst: Change Subrange to MySubrange for clarity
2017-05-13 21:52:19 +02:00
Mice Pápai
2e7551f17e Fix a typo in the Result variable block 2017-05-10 14:04:38 +02:00
jlp765
c8954b2b34 tut1.rst: Slices indices explanation (#5569) 2017-03-22 01:04:37 +01:00
mark-summerfield
9fda97b058 Fixed typo (#5508) 2017-03-12 20:01:01 +01:00
mark-summerfield
ef59b1a8eb Nicer English (#5513) 2017-03-12 19:55:14 +01:00
mark-summerfield
974b4d59b4 Nicer English (#5511) 2017-03-12 17:55:30 +01:00
mark-summerfield
c1ce20594e Nicer English (#5514) 2017-03-12 17:49:48 +01:00
mark-summerfield
639f786e5d Update tut1.rst (#5510)
In general: s/have to/must/g - but you can't do this mechanically because sometimes the must has to go back a word (e.g., line 519).

This looks really odd to me:
if thisIsaLongCondition() and
    thisIsAnotherLongCondition(1,
       2, 3, 4):
  x = true

I would have expected:
if thisIsaLongCondition() and
    thisIsAnotherLongCondition(
       1, 2, 3, 4):
  x = true

If the second form is valid and good Nim style then I suggest using it rather than the original. However, if the original is the preferred style then this should be mentioned in the text since it is unusual.

Since Nim is case-sensitive I think it is bad to write wrongly cased names, e.g., ``Bool`` is a built-in type on line 589. This isn't true since Bool isn't anything, but bool is. So in these cases I'd always reword to avoid this problem (and that's what I've done -- and it also avoids "bool. Bool" which was ugly).
2017-03-12 17:44:33 +01:00
mark-summerfield
3ab884a9e3 Suggested small change to code (#5509)
In a code example I think it best to either use full names (index, item) or abbreviated names where that's common (i, item) but not non-standard abbreviations (indx, itm). So I've changed it to index, item since it is a tutorial, although i, item would be just as good.
2017-03-12 17:40:14 +01:00
Yuriy Glukhov
eb0d510195 Removed $ from echo calls (#5368) 2017-02-10 16:25:22 +01:00
Anthon van der Neut
b3c170bdf3 failing trailing underscore, caused no hyperlink 2017-01-21 19:06:27 +01:00
jlp765
86c73cdfc2 Further tutorial updates (#5176)
* tut1: added multiline comments
* tut2: replaced expr/stmt with untyped/typed
* added some more template/macro example
* remove immediate pragma from example
2017-01-07 09:18:45 +01:00
jlp765
4b32b2cef6 Tutorial1 additions
Add extra For Statement stuff
Add Distinct Types
2017-01-03 12:06:34 +10:00
Araq
eed0128916 renamed most remaining .txt documentation files to .rst 2016-06-07 04:04:49 +02:00