Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » ValueArray, ValueMap now have Pick
ValueArray, ValueMap now have Pick [message #43011] Wed, 23 April 2014 09:29
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
It makes some tasks easier and more effective, like sorting them (reference example):

#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	ValueArray va;
	va << 12 << 3 << 5 << 1 << 10;
	DUMP(va);
	Vector<Value> v = va.Pick();
	Sort(v);
	va = pick(v);
	DUMP(va);
	
	ValueMap vm;
	vm(1, "world")(2, "hello");
	DUMP(vm);
	VectorMap<Value, Value> m = vm.Pick();
	SortByValue(m);
	vm = pick(m);
	DUMP(vm);
}
Previous Topic: Split/Join/Merge
Next Topic: ArrayCtrl::Sort new predicate variant
Goto Forum:
  


Current Time: Fri Apr 19 20:41:28 CEST 2024

Total time taken to generate the page: 0.01490 seconds