money.c

lpc4/lib/obj/money.c · 344 B

From the archive lpc4.05.14.tar.gz

Download the archive   « Back to the archive contents

inherit "/std/object";

int value=1;

int query_value() { return value; }
void set_value(int s) { return value; }

string short()
{
  string s;
	s=value/100 +" dollar and "+value%100+" cent"+(value%100==1?"":"s")
	s=s-"0 dollar and "-" and 0 cents"-"0 cents";
	if(strlen(s)) return s;
	call_out(2,selfdestruct);
	return 0;
}

mixed long()
{

}

Site Stats

Snippets: 1791
Codebases: 571