@Miguel7 An interpreter is doing more than just executing code.
1st it Tokenizes the code - meaning that it will recognize and evaluate the Syntax that was given to it, and replace it with tokens that are easier to read when executing.
2..I actually forgot all the stuff that comes afterwards
nth now it will actually execute the code that stands behind the Tokens and call the Tokens corresponding to the Tokens it inserted earlier.
I assume that
BIV_DECL_R (BIV_ScreenWidth_Height);
Defines some sort of Token or whats behind some sort of Token.
After thinking it through this is actually not that complex.
Code: Select all
VarSizeType BIV_ScreenWidth_Height(LPTSTR aBuf, LPTSTR aVarName)
{
return aBuf
? (VarSizeType)_tcslen(ITOA(GetSystemMetrics(aVarName[13] ? SM_CYSCREEN : SM_CXSCREEN), aBuf))
: MAX_INTEGER_LENGTH
}
aBuf is a output parameter in form of a pointer to a string. If this pointer is not null the function will put the data of GetSystemMetrics in form of a string inside aBuf and return the length of the string put inside aBuf.
aVarName[13] is a specific place for the 2 variable names A_ScreenWidth ( 13 characters long ) and A_ScreenHeight ( 14 characters long ). Checking for the 14th ( starting from 0 ) character will return 0 for A_ScreenWidth and 116 for A_ScreenHeight.
If there is no output the function returns MAX_INTEGER_LENGTH