home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p115 / 10.ddi / GCD4 / UPL / ARCLEN.UPL next >
Encoding:
Text File  |  1988-05-03  |  568 b   |  24 lines

  1. --ArcLen.upl 
  2. --Calculates the length of an arc
  3. -------------------------------------------------------------
  4. proc main
  5.  
  6. real AngleBegin, AngleEnd -- in radiens
  7. real Length    -- length of arc
  8. real CRadius --Radius of arc
  9. integer Num, MIB(1), iend
  10.  
  11. --digitize the arc to get MIB number
  12. GetEnt(1,Num,MIB(1),Iend) 
  13.  
  14. --verify stmt retrieves info on entites
  15. verify arc entid(MIB(1)) radius(CRadius) ab(AngleBegin) ae(AngleEnd)
  16.  
  17. --calcuate the length of the arc
  18. Length = 0.01754*CRadius*(AngleEnd-AngleBegin)
  19.  
  20. print 'The length is ', Length
  21.  
  22. end proc
  23.  
  24.