?
Solved

Resizing Variant arrays

Posted on 1997-04-05
1
Medium Priority
?
403 Views
Last Modified: 2010-04-03
First, look at my short cut of my code:

var
variant_array : variant;

BEGIN
variant_array := VarArrayCreate([1,1,1,1], varInteger);
...
vararrayredim(variant_array, x);
                      ^^^^^^
You see? I'd like to resize first (or second) one of my
variant array dimensions. How can I do that?
0
Comment
Question by:sanct
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
julio011597 earned 100 total points
ID: 1335169
You cannot!
As far as i can remember, you can only resize last dimension (check the help).

If you need to resize another dimension, i may suggest to create a new varArray with new dimensions, then copy the vals to it.
Maybe this kind of approach would be more elegant using pointers, so getting rid of old instances of your varArray, but this dipends on your knowledge of pointers (i've worked with Delphi in the past, so cannot be of more help on this now).

-julio
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month11 days, 4 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question