04-16-2010, 06:29 PM
I got the following error with both 1.2.5 and 1.2.6:
"Initializer expression is not constant"
The line is:
const prompt as string = chr(18,1,62,18,0,8)
I supossed the reason is the chr() calculation, so I put a literal string instead:
const prompt as string = "my prompt"
but nothing changed, the error remains.
The wiki page on CONST is not written, so I searched for CONST in the sources for examples. I searched all the sources for a "const as string" example (using a regular expression), but found nothing.
Are constant strings forbidden?
"Initializer expression is not constant"
The line is:
const prompt as string = chr(18,1,62,18,0,8)
I supossed the reason is the chr() calculation, so I put a literal string instead:
const prompt as string = "my prompt"
but nothing changed, the error remains.
The wiki page on CONST is not written, so I searched for CONST in the sources for examples. I searched all the sources for a "const as string" example (using a regular expression), but found nothing.
Are constant strings forbidden?
Marcos Cruz
http://programandala.net
http://programandala.net