View previous topic :: View next topic |
Author |
Message |
bifi
Joined: 28 Feb 2005 Posts: 25
|
Posted: Thu Jan 15, 2015 12:32 pm Post subject: Problem after Upgrade to 2.0.7.8 |
|
|
Hello Forum,
after updating to 2.0.7.8 the following code does no longer compile.
I get an Error: Error : 242 Line : 29 Data type of source and target variables do not match [ 0]
Here is my code:
Code: | $regfile = "m644def.DAT"
$crystal = 16000000
$baud = 19200
$hwstack = 128
$swstack = 128
$framesize = 60
Declare Sub 8416_AFD_Rd()
Declare Sub 8416_Rd(ByVal 8416_ADR As Byte, ByVal 8416_MAP As Byte, 8416_DATA As Byte)
Const 8416_W = &H20 ' CS8416 Adresse write
Const 8416_R = &H21 ' CS8416 Adresse read
Const 8416_AFD = &H0B
Dim 8416_AUDIO_FORMAT_DETECT As Byte ' &H0B R
8416_96KHZ Alias 8416_AUDIO_FORMAT_DETECT.0
8416_DGTL_SIL Alias 8416_AUDIO_FORMAT_DETECT.1
8416_DTS_CD Alias 8416_AUDIO_FORMAT_DETECT.3
8416_DTS_LD Alias 8416_AUDIO_FORMAT_DETECT.4
8416_IEC61937 Alias 8416_AUDIO_FORMAT_DETECT.5
8416_PCM Alias 8416_AUDIO_FORMAT_DETECT.6
do
loop
Sub 8416_AFD_Rd()
Call 8416_Rd(8416_W, 8416_AFD, 8416_AUDIO_FORMAT_DETECT)
End Sub
Sub 8416_Rd(ByVal 8416_ADR As Byte, ByVal 8416_MAP As Byte, 8416_DATA As Byte)
I2cstart
I2cwbyte 8416_ADR
I2cwbyte 8416_MAP
I2cstop
I2cstart
I2cwbyte 8416_R
I2crbyte 8416_DATA, NACK
I2cstop
End Sub
|
Any idea ?
Kind regards
Michael
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Jan 15, 2015 1:21 pm Post subject: |
|
|
this is a bug. when you remove the _ in constants it will compile. it is caused by the more flexible way you can pass constants to sub routines. of course this bugs defeats that purpose. we will publish a fix for this. _________________ Mark |
|
Back to top |
|
|
bifi
Joined: 28 Feb 2005 Posts: 25
|
Posted: Thu Jan 15, 2015 1:31 pm Post subject: |
|
|
Hi Mark,
thank you for your quick Response.
I my program i have a lot of const with an underscore in the name.
But only this one above gives an error.
Best regards
Michael |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Jan 15, 2015 1:35 pm Post subject: |
|
|
yes but that is because you start with a number. constants, variables, etc. best never start with a number. if you want a number start with c so you get c12345 for example. _________________ Mark |
|
Back to top |
|
|
drejansen
Joined: 10 Jun 2006 Posts: 26 Location: Hoeksche Waard
|
Posted: Fri Jan 16, 2015 1:56 pm Post subject: the _ problem |
|
|
thanks!
i am almost become crazy
now i see the solution.
greetings, Dré _________________ Pluk het moment!
een hele dag lukt toch niet.
Groeten, Dré Jansen
|
|
Back to top |
|
|
Evi
Joined: 05 Sep 2007 Posts: 12
|
Posted: Mon Jan 19, 2015 10:25 am Post subject: |
|
|
I installed this version. New IDE launched for a moment and then collapsed.
Old version 1.11.9.0 works fine.
Windows 7x64
Last edited by Evi on Mon Jan 19, 2015 10:34 am; edited 1 time in total |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Jan 19, 2015 10:31 am Post subject: |
|
|
Evi : write to support and do not forget to include your serial. _________________ Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Jan 20, 2015 12:12 pm Post subject: |
|
|
The problem was an illegal old version. so if the IDE just ends without error, simply install a legal license. _________________ Mark |
|
Back to top |
|
|
|