Help Please

Joined
Jun 25, 2009
Messages
2
Reaction score
0
Hi, i'm working on a algorithm that will do Run-Length data compression. This is what i'm doing: i initialize a matrix and tranform it in a vector and, while doing that, i discover what will be the size of the compressed new vector. Then i try to declare another vector with that size.

Look a small abstract of the algorithm:
PROCESS

TYPE line IS ARRAY (0 TO 3) OF INTEGER;
TYPE matrix IS ARRAY (0 TO 3) OF linha;
variable mat : matrix;

BEGIN

mat := ( (100, 99, 95, 94),
( 98, 96, 93, 0),
( 97, 92, 0, 0),
( 91, 0, 0, 0));

-- THIS IS WHERE THE VECTOR (100, 99,98,97,96,95,94,93,92,91,0,0,0,0,0,0) IS CREATED AND VECTOR_SIZE IS FOUND OUT.


PROCESS
TYPE comp IS ARRAY (0 TO VECTOR_SIZE) OF INTEGER;

variable COMPRESSED_VECTOR : comp;

-- THIS IS WHERE THE VECTOR IS USED TO CREATE THE COMPRESSED VECTOR. THE PROBLEM IS QUARTUS WON'T LET ME CREATE AN ARRAY USING A VARIABLE (0 TO VECTOR_SIZE), IT NEED TO BE A CONSTANT.

VECTOR_SIZE IS A SHARED VARIABLE AND I WAS THINKING ABOUT CONVERTING IT TO A CONSTANT, IF THAT'S POSSIBLE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help 0
HELP PLEASE 4
Hi people.. I need help in the Pascal please 0
Code was not Working Please Help 1
Turtle program error. Please help! 1
Code help please 4
Help please 8
Please help 2

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top