#include <cstdlib>
#include <jem/base/Signals.h>
#include <jem/base/System.h>
#include <jem/base/String.h>
#include <jem/io/Writer.h>
#include <jem/io/Reader.h>
#include <jem/util/Timer.h>
void scroll
{
double dt;
idx_t i;
i = 1;
while ( i <= str.
size() )
{
if ( dt > ((double) i) / 16.0 )
{
i++;
}
}
}
void printSysinfo (
Writer& out )
{
const char* PROPERTIES[] =
{
"os.version",
"os.name",
"os.machine",
"host.name",
"host.totalmem",
"host.nrprocs",
"user.home",
"user.name",
0
};
print ( out,
"----- System info ------\n\n" );
for ( int i = 0; PROPERTIES[i]; i++ )
{
"unknown" );
print ( out,
" ", PROPERTIES[i],
" = ", value, endl );
}
}
void memoryError ( int signum )
{
System::werror ( "*** Invalid memory reference; "
"stack trace follows ***\n\n" );
System::dumpStackTrace ();
System::werror ( "\n" );
::exit ( 1 );
}
void crashme ( int level )
{
volatile int* p = 0;
if ( level < 0 )
{
*p = 0;
}
else
{
crashme ( level - 1 );
}
}
int run ()
{
int number;
printSysinfo ( out );
scroll ( out, "hello world" );
print ( out,
"Please enter your name: " );
scroll ( out, "hello " + name + "\nhow is life today?" );
print ( out,
"please enter an integer: " );
scroll ( out,
"the integer you entered is: " +
String(number) );
crashme ( 10 );
return 0;
}
int main ()
{
}