Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Problem after Upgrade to 2.0.7.8

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
bifi

Bascom Member



Joined: 28 Feb 2005
Posts: 17

germany.gif
PostPosted: Thu Jan 15, 2015 12:32 pm    Post subject: Problem after Upgrade to 2.0.7.8 Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5027
Location: Holland

blank.gif
PostPosted: Thu Jan 15, 2015 1:21 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
bifi

Bascom Member



Joined: 28 Feb 2005
Posts: 17

germany.gif
PostPosted: Thu Jan 15, 2015 1:31 pm    Post subject: Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5027
Location: Holland

blank.gif
PostPosted: Thu Jan 15, 2015 1:35 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
drejansen

Bascom Member



Joined: 10 Jun 2006
Posts: 26
Location: Hoeksche Waard

netherlands.gif
PostPosted: Fri Jan 16, 2015 1:56 pm    Post subject: the _ problem Reply with quote

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
View user's profile
Evi

Bascom Member



Joined: 05 Sep 2007
Posts: 12

russia.gif
PostPosted: Mon Jan 19, 2015 10:25 am    Post subject: Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5027
Location: Holland

blank.gif
PostPosted: Mon Jan 19, 2015 10:31 am    Post subject: Reply with quote

Evi : write to support and do not forget to include your serial.
_________________
Mark
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5027
Location: Holland

blank.gif
PostPosted: Tue Jan 20, 2015 12:12 pm    Post subject: Reply with quote

The problem was an illegal old version. so if the IDE just ends without error, simply install a legal license.
_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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