home *** CD-ROM | disk | FTP | other *** search
- /* arexxdemo.wack
- *
- * (c) Copyright 1992-1993 Commodore-Amiga, Inc. All rights reserved.
- *
- * This software is provided as-is and is subject to change; no warranties
- * are made. All use is at your own risk. No liability or responsibility
- * is assumed.
- *
- * Example Wack ARexx script. Its role is to print out the name, version
- * and revision of a library at the specified address. If no address
- * is specified, the current address is used.
- *
- * Bind with
- *
- * bindrx libvers arexxdemo
- *
- */
- options results
- if ( arg() > 0 ) then
- addr = arg(1)
- else
- DO
- "currentaddr"
- addr = result
- END
-
- readlong d2x(x2d(addr)+10) /* Library.lib_Node.ln_Name */
- readstring result
- libname = result
- readword d2x(x2d(addr)+20) decimal /* Library.lib_Version */
- version = result
- readword d2x(x2d(addr)+22) decimal /* Library.lib_Revision */
- revision = result
- print libname version"."revision" at "addr
-