View previous topic :: View next topic |
Author |
Message |
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Fri Mar 24, 2017 12:45 pm Post subject: lbyte a reserved word ? |
|
|
This prog give an error 353 lbyte is a reserved word when it is compiled with 2.0.8.0
$regfile = "m2560def.dat"
$crystal = 16000000
$hwstack = 350 '250
$swstack = 350 '250
$framesize = 500
Dim Lbyte As Byte , Jbyte As Byte
Lbyte = 100
For Jbyte = 100 To 1
Lbyte = Lbyte - 1
Next
In my prg is a old habit to name the generic variables with the type jbyte, kword, Along etc...
so in my biiiig program for my astronomic clock I use a lot of lbyte I wrotethe prog with 2.0.7.9 and I have to check all .inc
jp
:wink:
(BASCOM-AVR version : 2.0.8.0 , Latest : 2.0.7.8 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Mar 24, 2017 12:49 pm Post subject: |
|
|
Yes lbyte and hbyte are asm functions, and reserved, sorry. _________________ Mark |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Fri Mar 24, 2017 2:44 pm Post subject: |
|
|
Hello Mark,
That is not a big problem. I will change it. but I don't see that in the help about "reserved words"
Why the 2.0.8.0 is not the latest version in the update link ?
JP
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Mar 24, 2017 3:00 pm Post subject: |
|
|
I will add them.
yes, the version is another story.
I will explain it later, but it is because there will be some changes regarding the update process. _________________ Mark |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Fri Mar 24, 2017 3:04 pm Post subject: |
|
|
@JP Try great Bascom feature "Replace"
Hit CTRL+R together. In new opened window, in field "Text to find" type "Lbyte" and in "Replace with" type something new, like "Low_byte"
Also select radiobuttons "Entire scope" and "Global"
Options "case sensitive" and "whole words only" is also good choice But be careful because some varaiables passed in brackets are lowercase.
Then click "Replace All" and You dont miss to replace any of old "Lbyte" instance
I think this is a clever solution
I use this function often when I want to change variable name in whole code when I think new name will better fit/describe my variable.
Bonne journée |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Fri Mar 24, 2017 3:48 pm Post subject: |
|
|
thanks EDC,
Yes I know how to change variable name, but in a big program you need to change it in all files .Inc and these types of generic variable are use in local so often...
but anyway i did it.
So now i'm starting ASTRO III a new and big astronomic clock with at least 5 screen. and some motors to copy the cathedral astronomical clock..... see it next year !
JP |
|
Back to top |
|
|
|