null pointer string workarround/support broken
Closed this issue · 2 comments
after a long time i was able to spend some time on my project with your ide again and decided to upgrade to the latest version but unfortunately
MyText2: []char = 'HELLO WORLD !!!'+#0;
gives an error like
HelloWorld[32,39] Error: Undefined operator: + for type: arr15-char
after fixing that more errors appeared probleable due to refering to variables constants in other units seems 0.71 is quite a bit different
so i go back to 0.6 and try to work out later how things have to work in 0.71
any help on that would be nice
Hi. Last versions changes the way strings are treated.
Strings have been always a problem in compilers. Probably, that's why C language doesn't include strings as basic type.
In P65Pas, strings doesn't exist as data type (by now) so all literal strings are treated as arrays of chars. In recent versions you can concatenate a char, just putting the char close to the string:
The operator "+" to concatenate strings, have now a new meaning: it's a operator for arrays, and it's not implemented.
ok i just leave out the + then