source: cprs/branches/tmg-cprs/m_files/TMGOOT1.m@ 1154

Last change on this file since 1154 was 796, checked in by Kevin Toppenberg, 15 years ago

Initial upload

File size: 926 bytes
RevLine 
[796]1TMGOOT1 ;TMG/kst/OO Test code ;03/25/06
2 ;;1.0;TMG-LIB;**1**;04/25/04
3
4 ;"Kevin Toppenberg MD
5 ;"GNU General Public License (GPL) applies
6
7 ;------------------------------------------
8 ;Main function below
9 ;------------------------------------------
10
11MyFunct()
12 new Widget ;"will store all instances of object type Widget
13 new tWidget set tWidget=$name(Widget)
14 new pWidget1 ;"will store 1 instance of Widget
15
16 set pWidget1=$$new^TMGOOL(tWidget,"constrWidget^TMGOOWG")
17
18 new done set done=0
19 for do quit:(done)
20 . new x,y
21 . read "input x (enter to quit): ",x,!
22 . if x="" set done=1 quit
23 . read "input y: ",y,!
24 . if y="" set done=1 quit
25 . write "> ",x," * ",y,"= ",$$fn^TMGOOL(pWidget1,"Multiply",x,y),!
26 . write "> ",x," / ",y,"= ",$$fn^TMGOOL(pWidget1,"Divide",x,y),!
27 . new temp set temp=$$fn^TMGOOL(pWidget1,"Show",x)
28 do delete^TMGOOL(pWidget1)
29
30 write "That all folks!",!
31
32 quit
Note: See TracBrowser for help on using the repository browser.