xsharp.eu • Error XS0103 The name 'CRLF' does not exist in the current context
Page 1 of 1

Error XS0103 The name 'CRLF' does not exist in the current context

Posted: Mon Jun 08, 2020 10:47 am
by ic2
This used to work, I last used X# for it somewhere in 2019 and now I get:

Error XS0103 The name 'CRLF' does not exist in the current context

In my notes it said that in Solution/Properties, Language I should set Suppress Standard Header to false. But that is false (unchanged).

What has changed and how do I solve this?

Dick

Error XS0103 The name 'CRLF' does not exist in the current context

Posted: Mon Jun 08, 2020 10:52 am
by ic2
I temporarily solved it by adding:

GLOBAL CRLF := e"/r/n" AS STRING

which I found on Github. But I would still ike to know why it stopped working.

Dick

Error XS0103 The name 'CRLF' does not exist in the current context

Posted: Mon Jun 08, 2020 12:08 pm
by Chris
Hi Dick,

CRLF is now in the runtime, in XSharp.Core.dll. If you had a reference to that it would work.

Previously (long ago) this had been declared as a preprocessor directive indeed in the standard header file (XSharpIncludeXSharpDefs.xh), but this was causing some problems so it as moved into the runtime dll.

Your solution is fine, but better change it to

DEFINE CRLF := e"rn"

so you are sure it is read-only and cannot accidentally modify it in your code.

Error XS0103 The name 'CRLF' does not exist in the current context

Posted: Mon Jun 08, 2020 12:31 pm
by ic2
Hello Chris

Thanks. Yes, this program hasn't been touched for a while. The DEFINE works, and it's not a big deal to change CRLF either but from converted VO code there will be a lot of CRLF's to change, so the DEFINE will work "fine".

Dick