Forum - MCS Electronics
View previous topic :: View next topic
Author
Message
luizabbadia Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
Posted: Thu May 14, 2015 7:27 pm Post subject: Strings doubt
Hi, all!
'--------------------------- Compiler Directives -------------------------------
'=====[ Compiler Directives ]==================================================
$regfile = "m644pdef.dat"
$crystal = 7372800 '
'$crystal = 8000000
$baud = 38400
$baud1 = 38400
$hwstack = 250
$swstack = 250
$framesize = 250
Dim Lati As String * 40
Dim Longi As String * 40
Lati = "*** This is + ID" + Longi
' Lati = "*** This is & ID" + Longi
End
I get the error:
Error : 242 Line : 16 Data type of source and target variables do not match [ 0] , in File : D:\PROJETOS\PROJETO_XYZ\SW\gsm\lixo.bas
If I replace
Lati = "*** This is + ID" + Longi
by
Lati = "*** This is & ID" + Longi
I get no error.
I think the character "+" inside a string is still a character, not an operator, right?
(BASCOM-AVR version : 2.0.7.8 )
Back to top
albertsm Joined: 09 Apr 2004 Posts: 5913 Location: Holland
Posted: Thu May 14, 2015 7:52 pm Post subject:
yes, everything inside "" is a string. So this is a bug i will change. _________________ Mark
Back to top
luizabbadia Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
Posted: Thu May 14, 2015 7:54 pm Post subject:
Thanks for the quick reply.
Back to top
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