Posted: Thu Apr 14, 2016 1:14 pm Post subject: Limits of using ALIAS
Hi,
I am using a number of arrays in my program to streamline some routines.
Is it possible to give an alias to each and every element of the array, e.g.
first_servo_position ALIAS variable_array(1)
second_servo_position ALIAS variable_array(2)
etc.
I do not get any compiling errors but am not sure if it does what I intended.
Then would it be possible to alias two arrays, for instance an array with part of another array? here I get compiling errors so I guess this at least is a no-go.
times(1) alias variable_array(5)
times(2) alias variable_array(6)
etc.
thanks
(BASCOM-AVR version : 2.0.7.9 , Latest : 2.0.7.8 )
original ALIAS was ONLY intended to give a meaningful name to a port pin : red_led alias portB.0 for example.
but some users found it to be handy for code like : myvar alias somevar and even referring to an array. This is accepted now.
code like test(1) alias something where you assign an array element is not accepted as you found out. _________________ Mark
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum