Page 1 of 1
New autocast feature!
Posted: Fri Dec 20, 2013 8:54 pm
by WilliamL
I thought this was a syntax error but I see now (thanks to ts-soft) that it is a new feature!
Code: Select all
EnableExplicit
Define a.i=10
Define a$
;a$=a ; this is ok and gives a syntax error
a$="This="+a ; gives 'This=10' and no syntax error
;a$="This="+Str(a) ; should be this?
Debug a$
Re: Shouldn't this be a syntax error?
Posted: Fri Dec 20, 2013 9:25 pm
by ts-soft
It is a new feature of PB5.10 LTS, autocast number to string!
//edit
History wrote:- Added: autocast of numeric values when string are involved, allowing to concatenate string and numeric in constants
Re: Shouldn't this be a syntax error?
Posted: Fri Dec 20, 2013 10:16 pm
by WilliamL
Thanks ts-soft!
I missed that!
That is about the only explanation I could think of but it never occurred to me that it was a new feature.
I thought that I might be losing my mind.
Maybe I should change my subject line to something more descriptive?
...I don't see that line in the Announcements. Where is 'History'?
[later] I found the line here
http://www.purebasic.com/news64.php at the PB site. That was version 5.1 (like you said).