How to disable Error XSXXXX

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Frank Müßner
Posts: 280
Joined: Sat Dec 12, 2015 2:22 pm
Location: Germany

How to disable Error XSXXXX

Post by Frank Müßner »

Hello,

i get XS0103 Error " 'MARK' does not exist in the current context. OK, right.

#pragma warning disable 0103
oDbServer:Replace({||" "}, #MARK, {||MARK="X"})
#pragma warning restore 0103

The Helpfile say, #Pragma not supported jet.
Change log 7a, i read this is fixed.

Which statement is true, and how is the correct spelling?

Regards, Frank
User avatar
robert
Posts: 4567
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

How to disable Error XSXXXX

Post by robert »

Frank,

Both statements are correct:
- Changelog: the #pragma does not throw an error when found in your source
- Not supported: however #pragma is ignored.

To fix your code, add a _FIELD-> prefix, or use one of the FieldGet functions:

Code: Select all

oDbServer:Replace({||" "}, #MARK, {||_FIELD->MARK="X"})
or

Code: Select all

oDbServer:Replace({||" "}, #MARK, {||FieldGetSym(#MARK)="X"})
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply