[2.11] Single vs. double quotes
Posted: Mon Apr 24, 2017 9:12 pm
Just got me the new build, install went smoothly.
Read in What's new:
...
In the Core and VO dialect a literal string that is enclosed with single quotes is a string literal. Double quotes are also string literals...
Starting with template "Basic X#" sample (with Xide 1.09):
FUNCTION Start( ) AS VOID
LOCAL c AS STRING
c:='x'
RETURN
Compiling i get:
Compilation failed (1 error)
error XS0029: Cannot implicitly convert type 'char' to 'string' 3,5 Start.prg Stringdelim
Either i misunderstand the help file or there is something amiss...
On further tries, i find:
LOCAL d AS Char
d:='y'
compiles - without the 'c'prefacing the help says i'd need!?
For completeness is started VS17, tried the same and see the same result.
@Chris: i see this new app listed as "StringDelim(v4.0)-X#", note the missing "/Core" part (properties show language X# and dialect Core) - is this new convention?
HTH
Karl
Read in What's new:
...
In the Core and VO dialect a literal string that is enclosed with single quotes is a string literal. Double quotes are also string literals...
Starting with template "Basic X#" sample (with Xide 1.09):
FUNCTION Start( ) AS VOID
LOCAL c AS STRING
c:='x'
RETURN
Compiling i get:
Compilation failed (1 error)
error XS0029: Cannot implicitly convert type 'char' to 'string' 3,5 Start.prg Stringdelim
Either i misunderstand the help file or there is something amiss...
On further tries, i find:
LOCAL d AS Char
d:='y'
compiles - without the 'c'prefacing the help says i'd need!?
For completeness is started VS17, tried the same and see the same result.
@Chris: i see this new app listed as "StringDelim(v4.0)-X#", note the missing "/Core" part (properties show language X# and dialect Core) - is this new convention?
HTH
Karl