diff --git a/uppsrc/Core/srcdoc.tpp/Tutorial$en-us.tpp b/uppsrc/Core/srcdoc.tpp/Tutorial$en-us.tpp index dd05a0289..ded319a81 100644 --- a/uppsrc/Core/srcdoc.tpp/Tutorial$en-us.tpp +++ b/uppsrc/Core/srcdoc.tpp/Tutorial$en-us.tpp @@ -34,20 +34,13 @@ method&] [s5; To iterate Vector you can use indices&] [s7; -|for(int i `= 0; i < v.[* GetCount](); i`+`+)&] [s7; -|-|LOG(v[* `[]i[* `]]);&] -[s16; 1&] -[s16; 2&] -[s16; 3&] -[s5; Alternative, U`+`+ also provides iterators&] -[s7; -|for(Vector`::[* Iterator] q `= v.[* Begin](), e `= v.[* End](); -q !`= e; q`+`+)&] +[s5; Alternative, U`+`+ also provides standard C`+`+ begin/end interface&] +[s7; -|for(auto q `= v.[* begin](), e `= v.[* end](); q !`= e; q`+`+)&] [s7; -|-|LOG([* `*]q);&] -[s16; 1&] -[s16; 2&] -[s16; 3&] -[s5; however the use of iterators is usually reserved for special -opportunities in U`+`+ (like implementing algorithm code) and -generally deprecated. We suggest you to use indices unless you -have a really good reason to do otherwise.&] +[s5; or with C`+`+11 range`-for syntax:&] +[s7; -|for(const auto`& q : v)&] +[s7; -|-|LOG(q);&] +[s5;/ &] [s5; [/ Note: LOG is diagnostics macro that outputs its argument to the .log file in debug mode. Another similar macros we will use in this tutorial are DUMP (similar to the LOG, but dumps the @@ -84,10 +77,10 @@ unknown maximal value&] [s3; 3. Transfer issues&] [s5; Often you need to pass content of one container to another of the same type. NTL containers always support [^topic`:`/`/Core`/srcdoc`/pick`_`$en`-us^ p -ick semantics], and, depending on type stored, also might support -[^topic`:`/`/Core`/srcdoc`/pick`_`$en`-us^ clone sematics]. When -transfering the value, you have to explicitly specify which one -to use:&] +ick semantics] (equivalent of std`::move), and, depending on type +stored, also might support [^topic`:`/`/Core`/srcdoc`/pick`_`$en`-us^ clone +sematics]. When transfering the value, you have to explicitly +specify which one to use:&] [s7; -|Vector v;&] [s7; -|v.Add(1);&] [s7; -|v.Add(2);&] diff --git a/uppsrc/Core/todo.txt b/uppsrc/Core/todo.txt index 0868954be..a03fc1564 100644 --- a/uppsrc/Core/todo.txt +++ b/uppsrc/Core/todo.txt @@ -32,6 +32,8 @@ Stream& Stream::operator/(int& i) { dword w = 0; if(IsStoring()) w = CoWork pipe max_queue +CoWork remove Semaphore + ----------------------- DONE