Home » Community » Coffee corner » Now this is pretty cool
Now this is pretty cool [message #57625] |
Mon, 11 October 2021 07:44 |
jjacksonRIAB
Messages: 227 Registered: June 2011
|
Experienced Member |
|
|
I keep finding neat functions in Upp. I live for stuff like this:
struct Records {
Vector<String> colA;
Vector<String> colB;
Vector<String> colC;
Vector<String> cold;
void Add(String a, String b, String c, String d) {
colA.Add(a);
colB.Add(b);
colC.Add(c);
colD.Add(d);
}
void Sort() {
CoIndexSort3(colA, colB, colC, colD);
}
};
CONSOLE_APP_MAIN {
FileIn f("whatever.csv");
Records recs;
while(!f.IsEof()) {
auto cols = GetCsvLine(f, ',', CHARSET_DEFAULT);
recs.Add(cols[0], cols[1], cols[2], cols[3]);
}
recs.Sort();
}
|
|
|
Goto Forum:
Current Time: Fri Apr 25 18:59:52 CEST 2025
Total time taken to generate the page: 0.00934 seconds
|