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

Method ArgIndexToInt64

source/script.cpp:7006–7024  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7004
7005
7006__int64 Line::ArgIndexToInt64(int aArgIndex)
7007// This function is similar to ArgIndexLength(), so maintain them together.
7008// Callers must call this only at times when sArgDeref and sArgVar are defined/meaningful.
7009// Caller must ensure that aArgIndex is 0 or greater.
7010{
7011#ifdef _DEBUG
7012 if (aArgIndex < 0)
7013 {
7014 LineError(_T("DEBUG: BAD"), WARN);
7015 aArgIndex = 0; // But let it continue.
7016 }
7017#endif
7018 if (aArgIndex >= mArgc) // See ArgIndexLength() for comments.
7019 return 0; // i.e. treat it as ATOI64("").
7020 if (!mArg[aArgIndex].is_expression && mArg[aArgIndex].postfix)
7021 return TokenToInt64(*mArg[aArgIndex].postfix);
7022 // Otherwise:
7023 return ATOI64(sArgDeref[aArgIndex]);
7024}
7025
7026
7027Var *Script::FindOrAddVar(LPCTSTR aVarName, size_t aVarNameLength, int aScope)

Callers

nothing calls this directly

Calls 2

TokenToInt64Function · 0.85
ATOI64Function · 0.85

Tested by

no test coverage detected