Adnan86
Full Member level 2
- Joined
- Apr 4, 2013
- Messages
- 121
- Helped
- 26
- Reputation
- 52
- Reaction score
- 26
- Trophy points
- 1,308
- Activity points
- 2,153
I have this code
But i have this error :
Error (10438): VHDL attribute error at po.vhd(26): prefix of 'LENGTH attribute must be an object of array type or an array subtype
x , ans : integer ;
What can i do for solve it ?
Thanks
- - - Updated - - -
and if i didn't use length i have this error :
Error (10454): VHDL syntax error at p.vhd(26): right bound of range must be a constant
Code:
[B]IF x >= 1 THEN
FOR i IN 1 TO x'length LOOP
ans := 10 * ans ;
END LOOP [/B]
But i have this error :
Error (10438): VHDL attribute error at po.vhd(26): prefix of 'LENGTH attribute must be an object of array type or an array subtype
x , ans : integer ;
What can i do for solve it ?
Thanks
- - - Updated - - -
and if i didn't use length i have this error :
Error (10454): VHDL syntax error at p.vhd(26): right bound of range must be a constant