Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
const as string?
#1
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?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)