mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-30 06:12:20 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@14413 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
b50113933e
commit
07b18dde80
3 changed files with 15 additions and 16 deletions
|
|
@ -1,31 +0,0 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
SeedRandom(0);
|
||||
Vector<String> data;
|
||||
for(int i = 0; i < 1000; i++) {
|
||||
int n = Random(7);
|
||||
data.Add();
|
||||
for(int j = 0; j < n; j++)
|
||||
data.Top() << Random() << ' ';
|
||||
}
|
||||
|
||||
double sum = 0;
|
||||
CoWork co;
|
||||
co * [&] {
|
||||
double m = 0;
|
||||
int i;
|
||||
while((i = co.Next()) < data.GetCount()) {
|
||||
CParser p(data[i]);
|
||||
while(!p.IsEof())
|
||||
m += p.ReadDouble();
|
||||
}
|
||||
CoWork::FinLock();
|
||||
sum += m;
|
||||
};
|
||||
|
||||
RDUMP(sum);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue