home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / 3_1SWTOO.DMS / in.adf / wack.lha / demos / arexxdemo.wack next >
Encoding:
Text File  |  1993-09-10  |  906 b   |  35 lines

  1. /* arexxdemo.wack
  2.  *
  3.  * (c) Copyright 1992-1993 Commodore-Amiga, Inc.  All rights reserved.
  4.  *
  5.  * This software is provided as-is and is subject to change; no warranties
  6.  * are made.  All use is at your own risk.  No liability or responsibility
  7.  * is assumed.
  8.  *
  9.  * Example Wack ARexx script.  Its role is to print out the name, version
  10.  * and revision of a library at the specified address.  If no address
  11.  * is specified, the current address is used.
  12.  *
  13.  * Bind with
  14.  *
  15.  *    bindrx libvers arexxdemo
  16.  *
  17.  */
  18. options results
  19. if ( arg() > 0 ) then
  20.     addr = arg(1)
  21. else
  22. DO
  23.     "currentaddr"
  24.     addr = result
  25. END
  26.  
  27. readlong d2x(x2d(addr)+10)    /* Library.lib_Node.ln_Name */
  28. readstring result
  29. libname = result
  30. readword d2x(x2d(addr)+20) decimal    /* Library.lib_Version */
  31. version = result
  32. readword d2x(x2d(addr)+22) decimal    /* Library.lib_Revision */
  33. revision = result
  34. print libname version"."revision" at "addr
  35.