Private strMsg as string=""Hello world" 'I meant to type "Hello world"
log(strMsg) 'Empty string is printed
As shown, there is an extra double quote, by mistake, at the beginning of the text. And both IDE and compiler ignore Hello World" part once they reach the second double quote thinking it's an empty string.
Step 2. Insert a double quote anywhere in the above string:
B4X:
Private strMsg as string="Hell"o world"
IDE will happily accept it without further validation while compiler would truncate the string at the insertion point. The above declaration will cause strMsg to contain "Hell" instead of expected "Hello World".