2011-08-15, 12:37
#1
long filesize(FILE *fp) { long offset, size; offset = ftell(fp); /* remember current position */ fseek(fp, 0, SEEK_END); size = ftell(fp); fseek(fp, offset, SEEK_SET); /* return to previous position */ return size; }
/// <summary>
/// Some function.
/// </summary>
/// <returns>Some value.</returns>
private int SomeFunc()
{
//Calculate a value to return
int valueToReturn = 1 + 2 * 3;
//Return the calculated value
return valueToReturn;
}
/// <summary>
/// Some function.
/// </summary>
/// <returns>Some value.</returns>
private int SomeFunc()
{
//Calculate a value to return
int valueToReturn = 1 + 2 * 3;
//Return the calculated value
return valueToReturn;
}
private int SomeFunc()
{
//Calculate a value to return
int valueToReturn = 1 + 2 * 3;
//Return the calculated value
return valueToReturn;
}
private int SomeFunc()
{
int valueToReturn = 1 + 2 * 3; //Calculate a value to return
return valueToReturn; //Return the calculated value
}
void init_input() { int i; SDL_EnableUNICODE(1); SDL_ShowCursor(SDL_DISABLE); for (i = 0; i < 256; i++) mouse.buttons[i] = 0; SDL_WarpMouse(mainscr->w / 2, mainscr->h / 2); /* center mouse pointer */ }
void init_input() { int i; SDL_EnableUNICODE(1); SDL_ShowCursor(SDL_DISABLE); for (i = 0; i < 256; i++) mouse.buttons[i] = 0; // center mouse pointer SDL_WarpMouse(mainscr->w / 2, mainscr->h / 2); }
.
if( *pwszFunction == L'{' )
{
pwszFunction++; // move past {
const wchar_t* pwszBegin = pwszFunction; // where function code starts
const wchar_t* pwszEnd = NULL;
pwszFunction = match( pwszFunction, L'{', L'}' ); // find last position for function
if( pwszFunction != L'\0' ) pwszEnd = (pwszFunction - 1);
if( pwszEnd != NULL )
{
lError = parse( pwszBegin, pwszEnd, *pexpressionFunction ); // parse code for function into expression
if( lError == 0 )
{
rexpression.append( NULL, pexpressionFunction ); // append function to expression
valueInsert = pexpressionFunction;
}
else
{ assert( false );
std::wstring string( L"Function (subroutine) error - function: \"");
string += pexpressionFunction->get_wtext();
rexpression.append_error( string.c_str(), pwszPosition, pwszFunction );
delete pexpressionFunction;
return CALCULATE_E_MethodError;
}
}// if( pwszEnd != NULL ) {
}
Du måste vara medlem för att kunna kommentera
Flashback finansieras genom donationer frn vra medlemmar och beskare. Det r med hjlp av dig vi kan fortstta erbjuda en fri samhllsdebatt. Tack fr ditt std!
Swish: 123 536 99 96 Bankgiro: 211-4106