Strings vs Variables
Posted: Sun Oct 19, 2008 3:47 am
Code: Select all
Text$="Hello"
Text=100
Debug Text$
Debug Text
Hello
100
I love how strings and variables can share the same name... please keep it this way for always

http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Text$="Hello"
Text=100
Debug Text$
Debug Text
Code: Select all
Text$="Hello"
Text.s="there"
Debug Text$
Debug Text
It isn't the same name. ^^Also, you can have 2 x string variables with the same name:
I was just worried that .s might completely replace $ one day... I happen to like them both and how it's possible to group variables with the same name together, and how it's even possible to use BASIC command names as strings if you wanted to do so.PB wrote:@Lykaestria: Relax, it isn't going to change. What made you think so?