Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Creating packages and passing arrays...

Creating packages and passing arrays...

Creating packages and passing arrays...

So here's the deal:

I have a main file in which i have 1 main procedure: "procedure huf".

I also have 2 procedures which get called by procedure huf, which are "procedure compress" and "procedure decompress"

Inside each of these procedures (compress and decompress) i have other procedures.
This sub-procedures use some variables that are local to them and some variables that are not local to them but to the biggest procedure, like for example "procedure compress". (further down links to the files)

What i've been trying to do for the last 24 hours and with more than 30 tutorials found over the internet, is to put the smaller sub-procedures in another file, so that in the main file i just call the sub-procedures, so that the code is easier to understand and to take care of in the future.

I've read everything about creating the *.ads and the *.adb files.

My main problem (i have other problems of course) is that i don't seem to be able to pass the parameters that are local to huf.adb to my files (procedures.adb and procedures.ads).

So, i've been wondering if someone could explain step-by-step how to create a package and pass this parameters...

In C language is as easy as defining the prototypes of the functions in a file with "h" extension and include it in whatever files *.c need it, and when compiling just specify all the *.c for the linking (gcc main.c functions.c) and i found this is really easy compared to the impossibilities i've been encountering  in ADA....

I need to deliver this exercise by the 13th of December 2010.

On this link i put a piece of the huf.adb:


On this link i put my PROCEDURAS.adb:


On this link i put my PROCEDURAS.ads:


what i'm trying to do for now is to completely externalize the procedure "Create_Table".

I hope i explained myself clearly enough, if not i'll be waiting your feedback on how to do it better.



RE: Creating packages and passing arrays...

thank everybody for you support, which was by the way NOT existent at all....

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close