Qurak

ConfirmAssert

उपलब्ध

Confirms that a test evaluates to True otherwise throwing to the enclosing Enclose

ConfirmAssert[test]
ConfirmAssert[test, info]
ConfirmAssert[test, info, tag]
Enclose[ConfirmAssert[2 > 1];2] → 2Enclose[ConfirmAssert[2 > 3];2] → Failure[ConfirmationFailed, <|MessageTemplate -> Assertion `` failed., MessageParameters -> {HoldForm[2 > 3]}, ConfirmationType -> ConfirmAssert, Expression -> False, Information -> Null, Test -> False, HeldTest -> Hold[2 > 3]|>]Enclose[Echo[1];ConfirmAssert[1 == 0];Echo[2]] → Failure[ConfirmationFailed, <|MessageTemplate -> Assertion `` failed., MessageParameters -> {HoldForm[1 == 0]}, ConfirmationType -> ConfirmAssert, Expression -> False, Information -> Null, Test -> False, HeldTest -> Hold[1 == 0]|>]

विषय

संबंधित

सभी 6300 फ़ंक्शन · इसे किसी MCP क्लाइंट से उपयोग करें