View previous topic :: View next topic |
Author |
Message |
matlen
Joined: 15 Oct 2006 Posts: 2
|
Posted: Tue Dec 30, 2014 11:49 am Post subject: Dim R1 as Single = Error |
|
|
Hallo
I have update my Bascom-AVR to Version 2.0.7.8, after Compile my Project now i become errors
'Error : 25 Line : 11 Variable already dimensioned [Variable already dimensioned]...'
I have locate the error it is the variable R1 or R2 (stand vor resistor1 and resistor 2 in my project)
Is R1 etc now a reserved word ?
THX for your Help.
Here a Testproject with the same error:
Code: |
$regfile = "m328pdef.dat"
$crystal = 8000000
$hwstack = 40
$swstack = 16
$framesize=32
Dim R1 As Single
|
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Dec 30, 2014 11:55 am Post subject: |
|
|
yes r0-r31 which are avr registers are servered words or better said exposed byte variables for easy access to the registers : r0=1 instead of using setreg _________________ Mark |
|
Back to top |
|
|
matlen
Joined: 15 Oct 2006 Posts: 2
|
Posted: Tue Dec 30, 2014 4:28 pm Post subject: |
|
|
Ok. Thank you |
|
Back to top |
|
|
Frankeman
Joined: 11 Aug 2004 Posts: 948 Location: the Netherlands
|
Posted: Tue Dec 30, 2014 10:32 pm Post subject: |
|
|
Maybe it is a nice feature that reserved variable names can get an own color like the Keywords, ASM, Registers, Strings.
R0..R31 are not the only variables (there are many) that may not be defined by the programmer him(her)self.
Frank. |
|
Back to top |
|
|
aphawk
Joined: 23 Jan 2010 Posts: 168 Location: Brazil
|
Posted: Tue Dec 30, 2014 11:25 pm Post subject: |
|
|
Very good idea, Frank !
Maybe Mark can make this in an future update.
Paulo |
|
Back to top |
|
|
nilmourad
Joined: 25 Mar 2012 Posts: 3
|
Posted: Sun Jan 04, 2015 3:25 pm Post subject: |
|
|
in version 2.0.7.1 I tested your code and it works no problem !!!!!! |
|
Back to top |
|
|
|