home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 12
/
CD_ASCQ_12_0294.iso
/
news
/
563
/
ocdemo
/
demo.txt
< prev
next >
Wrap
Text File
|
1993-10-09
|
3KB
|
209 lines
OBJECTCRAFT TEXT FILE
---------------------
OBJECTS
-------
-Object: doneit
| STRING
|-Click --- YES
| STRING
|-Image --- done
| INTEGER
|-X --- 264
| INTEGER
|-Y --- 210
| INTEGER
|-count --- 200
-Object: target
| INTEGER
|-count --- 150
| INTEGER
|-y3 --- 125
| FLOAT
|-y2 --- 145600
| FLOAT
|-y1 --- 125.466667
| INTEGER
|-currentv --- 1120
| STRING
|-Image --- bar
| INTEGER
|-Y --- 174
| INTEGER
|-X --- 473
| INTEGER
|-targetv --- 3000
-Object: order
| FLOAT
|-price --- 1.40
| INTEGER
|-number --- 200
| INTEGER
|-total --- 280
| INTEGER
|-Method: ftot --- 0
-Object: salestoday
| INTEGER
|-salesq --- 800
| INTEGER
|-salesv --- 1120
METHODS:
-------
doneit.Click ()
--------------
if (click='YES') then image='done';
if (click='NO') then
begin
image='done1';
count=0;
while (count<200)
do begin
count=count+1;
end;
image='done';
click='YES';
salestoday.salesq=salestoday.salesq+order.number;
salestoday.salesv=salestoday.salesv+order.total;
target.currentv=salestoday.salesv;
end;
doneit.Image ()
--------------
draw ();
doneit.X ()
----------
erase ();
setx (x);
draw ();
doneit.Y ()
----------
erase ();
sety (y);
draw ();
order.ftot ()
------------
total=price*number
order.number ()
--------------
ftot () ;
order.price ()
-------------
ftot();
target.Image ()
--------------
draw ();
target.X ()
----------
erase ();
setx (x);
draw ();
target.Y ()
----------
erase ();
sety (y);
draw ();
target.currentv ()
-----------------
color(2);
y2=130*currentv;
if (currentv>targetv) then y2=130*targetv;
y1=y-(y2/targetv);
y3=round(y1);
rectangle(x,y3,x+20,y);
if (currentv>targetv) then
begin
color(14);
count=0;
while (count<300) do
begin
count=count+1;
end;
rectangle(x,y3,x+20,y);
color(2);
count=0;
while (count<150) do
begin
count=count+1;
end;
rectangle(x,y3,x+20,y);
color(14);
count=0;
while (count<300) do
begin
count=count+1;
end;
rectangle(x,y3,x+20,y);
color(2);
count=0;
while (count<150) do
begin
count=count+1;
end;
rectangle(x,y3,x+20,y);
end;