MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / VarIsReadOnlyError

Method VarIsReadOnlyError

source/script.cpp:12984–12993  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12982}
12983
12984ResultType Script::VarIsReadOnlyError(Var *aVar, int aErrorType)
12985{
12986 TCHAR buf[127];
12987 sntprintf(buf, _countof(buf), _T("This %s cannot %s.")
12988 , VarKindForErrorMessage(aVar)
12989 , aErrorType == VARREF_LVALUE ? _T("be assigned a value")
12990 : aErrorType == VARREF_REF ? _T("have its reference taken")
12991 : _T("be used as an output variable"));
12992 return ScriptError(buf, aVar->mName);
12993}
12994
12995ResultType Line::VarIsReadOnlyError(Var *aVar, int aErrorType)
12996{

Callers 3

AssignVirtualMethod · 0.80
AssignStringMethod · 0.80
AssignBinaryNumberMethod · 0.80

Calls 2

sntprintfFunction · 0.85
VarKindForErrorMessageFunction · 0.85

Tested by

no test coverage detected