From fd3d1eb1f0fb66e3f28e91d68609d34d3029ecb6 Mon Sep 17 00:00:00 2001 From: halw Date: Sat, 14 Aug 2010 15:00:01 +0000 Subject: [PATCH] Added relationship of {SPECIAL}.count to {SPECIAL}.capacity Author:halw Date:2010-08-14T15:00:01.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@654 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../changes-eiffel-libraries-support-void-safety.wiki | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/documentation/current/method/void-safe-programming-eiffel/converting-existing-software-void-safety/changes-eiffel-libraries-support-void-safety.wiki b/documentation/current/method/void-safe-programming-eiffel/converting-existing-software-void-safety/changes-eiffel-libraries-support-void-safety.wiki index a3fb8dac..ab37d8d3 100644 --- a/documentation/current/method/void-safe-programming-eiffel/converting-existing-software-void-safety/changes-eiffel-libraries-support-void-safety.wiki +++ b/documentation/current/method/void-safe-programming-eiffel/converting-existing-software-void-safety/changes-eiffel-libraries-support-void-safety.wiki @@ -76,6 +76,16 @@ The availability of {TO_SPECIAL}.make_filled_area and {TO_SPE {TO_SPECIAL}.make_empty_area is available only in ''default'' mode. +====Relationship of feature {SPECIAL}.count to {SPECIAL}.capacity==== + +In previous versions, for a particular instance of SPECIAL the queries count and capacity yielded the same value. + +This is no longer always true. If an instance of SPECIAL is created with, for example, make_empty (10), although the capacity will be 10, the count will be zero. + +However creating a SPECIAL using make_filled will produce an instance in which count and capacity are equal upon creation. So the behavior is similar to that of previous versions. Also, make_filled is available in both ''default'' and ''compatible'' modes. + +If you are depending upon count and capacity having the same value, then use make_filled for creation. And then if you need resizing, use the "with_default" versions of the "resized" queries, specifically resized_area_with_default and aliased_resized_area_with_default. +