home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Super Store 2.3 / TESTDRIVE_2.ISO / realizer / samples / refch19 / trigplot.rlz < prev   
Encoding:
Text File  |  1992-09-30  |  1.4 KB  |  45 lines

  1. '***********************************************************************
  2. '    TrigPlot.rlz                      
  3. '
  4. '    Realizer Reference Guide : Chapter 19
  5. '
  6. '    Copyright ⌐ 1991-1992 Computer Associates International, Inc.
  7. '    All rights reserved.
  8. '
  9. '***********************************************************************
  10.  
  11. PROC formprocTrig(params) 
  12.     FormSelect(params[_FormNum]) 
  13.     SELECT CASE params[_ItemNum] 
  14.         CASE    1    'Plot 
  15.             Formula = SubStr$(FormQStr(30), "()", "(x)") 
  16.             x = Index(360) * (3.1416/180) 
  17.             EXECUTE "Results = " + Formula 
  18.             PlotColor = PlotColor + 1 
  19.             ChartSetColor(PlotColor) 
  20.             ChartLine(Results) 
  21.             ChartSetKey(Formula) 
  22.         CASE 40    'Clear 
  23.             ChartControlPane(_Clear) 
  24.             ChartControlKey(_Clear) 
  25.             PlotColor = _Red 
  26.         CASE 50    'Quit 
  27.             FormControl(_Close) 
  28.     END SELECT 
  29. END PROC 
  30.  
  31. formTrig = FormQUnique 
  32. FormNew(formTrig; "Trigonometric Graphs", _Title) 
  33. FormControl(_Size; _Center, _Center, 80 pct, 80 pct) 
  34. FormSetObject(10, _Chart, "", 5 pct, 5 pct, 90 pct, 50 pct) 
  35. FormSetObject(20, _CaptionLeft, "Formula: ", 20 pct, 71 pct) 
  36. FormSetObject(30, _TextBox, "sin()", 35 pct, 70 pct, 45 pct, _Default) 
  37. FormSetObject(1, _DefButton, "Plot", _Left, _Bottom) 
  38. FormSetObject(40, _Button, "Clear", _Center, _Bottom) 
  39. FormSetObject(50, _Button, "Quit", _Right, _Bottom) 
  40. FormSetProc(formprocTrig) 
  41.  
  42. PlotColor = _Red 
  43. FormControl(_Show) 
  44. ChartControlKey(_Show) 
  45.