home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d969 / ace.lha / ACE / ACE-2.0.lha / PRGS.lha / Library / library.b
Text File  |  1994-01-16  |  1KB  |  52 lines

  1. '..An example of shared library function usage in ACE.
  2.  
  3. '..Note that to call any shared library function from ACE,
  4. '..there are three requirements:
  5.  
  6. '..    1. You must open the library in question.
  7. '..    2. You must declare the function.
  8. '..    3. A .bmap file for the library must be 
  9. '..       present in the ACEbmaps: directory.
  10.  
  11. '..For this program, the required bmaps are dos.bmap and
  12. '..graphics.bmap.
  13.  
  14. '..Note that one of the function declarations below shows how 
  15. '..the library can be specified. This will result in a faster
  16. '..lookup by directing ACE to the correct .bmap file (see "DateStamp").
  17.  
  18. '..Note also how the optional parameter-list can be specified for a 
  19. '..function (see "Text"). This is useful for documentation purposes.
  20.  
  21. LIBRARY "graphics.library"
  22. LIBRARY "dos.library"
  23.  
  24. DECLARE FUNCTION VBeamPos& LIBRARY
  25. DECLARE FUNCTION Text(Rp&,text$,length&) LIBRARY
  26. DECLARE FUNCTION Move LIBRARY 
  27. DECLARE FUNCTION SetSoftStyle LIBRARY
  28. DECLARE FUNCTION DrawEllipse LIBRARY
  29. DECLARE FUNCTION DateStamp LIBRARY "dos.library"
  30.  
  31. CLS
  32.  
  33. COLOR 1
  34. DrawEllipse(window(8),100,100,50,25)
  35.  
  36. PRINT "Vertical beam position =";VBeamPos
  37.  
  38. hello$="Hi there"
  39. addr&=VARPTR(hello$)
  40.  
  41. COLOR 2
  42. Move(WINDOW(8),100,100)
  43. SetSoftStyle(WINDOW(8),1&,255&)  '...underline
  44. Text(WINDOW(8),addr&,CINT(LEN(hello$)))
  45. COLOR 1
  46.  
  47. DIM v&(2)
  48. DateStamp(varptr(v&))
  49. PRINT "Time =";v&(1)\60;":";v&(1) mod 60;":";v&(2)\50
  50.  
  51. LIBRARY CLOSE
  52.