1
Vote

String <> null problem

description

The following expression generates the error below. From the docs, I think null should be converted to an empty string "" which should work.
var function = context.CompileExpression<bool>("\"I0005\" <> null");
The following does work:
var function = context.CompileExpression<bool>("\"I0005\" <> \"\"");
Error:
de.mastersign.expressions.SemanticErrorException was unhandled
  HResult=-2146232832
  Message=The left operand of the comparison 'unequal' is a string but the right operand is not.

  Source=Mastersign.Expressions
  StackTrace:
       at de.mastersign.expressions.EvaluationContext.ParseAndCheckExpression(String input) in d:\Daten\Projekte\Mastersign.Expressions\Mastersign.Expressions\EvaluationContext.cs:line 676
       at de.mastersign.expressions.EvaluationContext.CompileExpression[TResult](String input) in d:\Daten\Projekte\Mastersign.Expressions\Mastersign.Expressions\EvaluationContext.cs:line 735
       at Points_Generator_CS.Classes.SimpleExpressionEvaluator.EvaluateExpression(String expression) in c:\Programming (Work)\dotNet\Points Generator v3\Source\Points Generator CS\Classes\SimpleExpressionEvaluator.cs:line 48
       at Points_Generator.wizFBCGeneric_FBCOrder_PointsGeneratorWizard.GeneratePoints_FBCFirst(Char& OutputSeperatorChar) in C:\Programming (Work)\dotNet\Points Generator v3\Source\Points Generator\FBC Generic - FBC Order\wizFBCGeneric_FBCOrder_PointsGeneratorWizard.vb:line 467
       at Points_Generator.wizFBCGeneric_FBCOrder_PointsGeneratorWizard.GeneratePoints() in C:\Programming (Work)\dotNet\Points Generator v3\Source\Points Generator\FBC Generic - FBC Order\wizFBCGeneric_FBCOrder_PointsGeneratorWizard.vb:line 293
       at Points_Generator.wizFBCGeneric_FBCOrder_PointsGeneratorWizard.wizFinish_CloseFromNext(Object sender, PageEventArgs e) in C:\Programming (Work)\dotNet\Points Generator v3\Source\Points Generator\FBC Generic - FBC Order\wizFBCGeneric_FBCOrder_PointsGeneratorWizard.vb:line 61
       at Gui.Wizard.WizardPage.OnCloseFromNext(Wizard wiz)
       at Gui.Wizard.Wizard.Next()
       at Gui.Wizard.Wizard.btnNext_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  InnerException: 

comments