Show/Hide Toolbars

XSharp

Can't locate WITH statement for DOT/COLON expression without left hand side.

This error will be generated when the compiler finds a DOT/COLON expression outside of a WITH statement.

In the FoxPro dialect this error may be replaced with a warning XS9108

FUNCTION Start as VOID
LOCAL oError as Error
TRY
  oError := Error{}
  WITH oError
        :Description   := "Some Test"   // This works, inside the WITH block
        :GenCode       := EG_ARG
  END WITH
  :SubCode := 12345 // Error XS9082 here because this is outside of the WITH block
  THROW oError
CATCH e as Error
  ? e:ToString()
END TRY
RETURN