defining sizes of arrays over several units

General discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
tormod
Posts: 57
Joined: 29 Nov 2004 16:31

defining sizes of arrays over several units

#1 Post by tormod » 26 Sep 2018 13:10

const CARRAYSIZE : word = 1000;

var
MyArray : [CARRAYSIZE] of byte;

seems to work within same unit, but if you have following declaration in another unit it fails because it does not recognise CARRAYSIZE.

MyArray : [CARRAYSIZE] of byte; external; CARRAYSIZE has to be changed to real values. This is a problem when declaring global values if it changes you need to update it in every unit. Why, any workaround?

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: defining sizes of arrays over several units

#2 Post by petar.suknjaja » 27 Sep 2018 16:44

Hi Tormod,
I will check this and let you know what I've found.
Kind regards,
Petar

Post Reply

Return to “mikroPascal PRO for PIC32 General”