@database "ARexxGuide.guide" @index ARx_Index/ARx_NdxCont @xref ARx_Guide.xref @node MAIN " ARexxGuide Copyright © 1993,1994 Robin Evans" @next ARx_Elements.ag/MAIN @toc COMPCONT @{fg highlight}AN AMIGAGUIDE® TO ARexx@{fg text} Second edition (v2.0a) by Robin Evans @{" Registration " link REG} @{" Comprehensive contents " link COMPCONT} @{" Introduction " link ARx_Intro.ag/MAIN} @{" Tutorials " link ARx_Tutor.ag/MAIN} @{" Techniques " link ARx_Tknq.ag/MAIN} Reference @{" Basic elements " link ARx_Elements.ag/MAIN} @{" Instructions " link ARx_Instr.ag/MAIN} @{" Functions " link ARx_Func.ag/MAIN} Guide to the powders Syntax & explanation Syntax & explanation & potions in the ARexx of keywords and of built-in & support chemistry set. instructions functions. @{" Operators " link ARx_Operator.ag/MAIN} @{" Commands " link ARx_Cmd.ag/MAIN} @{" Error codes " link ARx_Error.ag/MAIN} Glue for arithmetic, Utility programs. Error codes/messages. comparison, & logical Possible causes and expressions. solutions. @{" INDEX " link ARx_Index/ARx_NdxCont} Copyright © 1993,1994 Robin Evans. All rights reserved. @endnode @node REG "ARexxGuide | Registration | THANK YOU FOR YOUR SUPPORT!" @prev MAIN This guide is shareware. Please use it and pass it on (in its original archive) to your friends and acquaintances. If you learn something from the guide or find it helpful in writing ARexx programs, then please take a moment to fill out the registration form and send in the fee. @{fg highlight}The requested fee for this guide is $15.00.@{fg text} For that you get the complete reference you see before you now -- information you would pay $25 to $40 for if it were presented in traditional book form. Sorry, folks, we don't have operators standing by to take your order, but we do have -- yes, standing by -- representatives of the worlds's postal services who will deliver your registration fee to the address below. To make things easier, and to provide information helpful in making future revisions to this guide, the button below will guide you through an on-line registration form that can be printed immediately or saved to disk. @{" Fill out registration form " system "rx ARx_IactExamples.rexx ARx_Reg.rexx"} @{" * " link IACTEXMP} @{fg highlight}Send registration fee (and optional form) to:@{fg highlight} Robin Evans 1020 Seneca #405 Seattle WA 98101-2720 @{fg highlight}And thank you, very much.@{fg text} Please send comments or requests to any of the following on-line addresses: robin@halcyon.com on Internet R.EVANS6 on GEnie r.evans6@genie.geis.com on Internet Next: ARexxGuide contents | Prev: Registration intro | Contents: main @endnode @node COMPCONT "ARexxGuide | CONTENTS" @next MAIN @prev MAIN @{fg highlight}Foreword:@{fg text} @{fg highlight}Preface@{fg text} @{" Acknowledgements " link ARx_Intro.ag/ACKN} @{" References " link ARx_Intro.ag/REF} @{" About the author " link ARx_Intro.ag/AUTHOR} @{" Compatibility issues " link ARx_Intro.ag/COMPATIBILITY} @{fg highlight}About this guide@{fg text} @{" Navigating hints " link ARx_Intro.ag/NAVG} @{fg highlight}Intro to ARexx@{fg text} @{" Hello World! " link ARx_Intro.ag/HIWRLD} @{" Why ARexx? " link ARx_Intro.ag/WHYREXX} @{" Getting it started " link ARx_Intro.ag/STARTUP} @{" Writing programs " link ARx_Intro.ag/WRITING} @{" Running a script " link ARx_Intro.ag/RUNAREXX} @{fg highlight}Tutorials:@{fg text} @{" Using ARexx with macros: Extending keyboard macros " link ARx_Tutor.ag/MCRINTRO} @{" Simple macro: recording keystrokes " link ARx_Tutor.ag/MCR1} @{" Adding ARexx control to the macro " link ARx_Tutor.ag/MCR2} @{" A closer look at ARexx IF instruction " link ARx_Tutor.ag/MCR3} @{" Repeating macro with an ARexx loop " link ARx_Tutor.ag/MCR4} @{" Growing a macro " link ARx_Tutor.ag/MCR5} @{" ADDRESS and the macro " link ARx_Tutor.ag/MCR6} @{" Debugging a macro " link ARx_Tutor.ag/MCR7} @{" Using the ARexxGuide online help system " link ARx_Tutor.ag/HELPKEYMACRO} @{" Setting up a help key macro " link ARx_Tutor.ag/SETUPHELP} @{" Environmental variables " link ARx_Tutor.ag/HELPENVVAR} @{" Information about a non-matches " link ARx_Tutor.ag/FULLHELP} @{" Building a new help-key macro " link ARx_Tutor.ag/BUILDHELP} @{" GetCLine: Get current line from editor " link ARx_Tutor.ag/GETCLINE} @{" GetCPos: Get cursor position from editor " link ARx_Tutor.ag/GETCPOS} @{" GetCWord: Calculate (or get) current word " link ARx_Tutor.ag/GETCWORD} @{" DisplayStatus: Display a message in status bar " link ARx_Tutor.ag/DISPLAYSTATUS} @{" BoolReq: Post a Boolean requester " link ARx_Tutor.ag/BOOLREQ} @{" GetWinInfo: Get information about editor's window " link ARx_Tutor.ag/GETWININFO} @{" EditorExit: Send special editor commands on exit " link ARx_Tutor.ag/EDITOREXIT} @{" SetExecStr: Set command issued by info window " link ARx_Tutor.ag/SETEXECSTR} @{" SetAddress: Set the address used by info window " link ARx_Tutor.ag/SETADDRESS} @{" DisplayAG: Display the node in AmigaGuide viewer " link ARx_Tutor.ag/DISPLAYAG} @{" A complete program example: Uncrunch.rexx " link ARx_PrgUcr.ag/UCREXPLAN} @{fg highlight}Interactive examples:@{fg text} @{" * " link IACTEXMP} @{" Test for valid symbols " system "rx ARx_IactExamples.rexx ShowValidSymbol"} @{" Comparison demonstration " system "rx ARx_IactExamples.rexx ARx_Cmpr.rexx"} @{" NUMERIC demonstration " system "rx ARx_IactExamples.rexx ShowNumeric" } @{" TRACE demonstration " system "rx ARx_Trace.rexx" } @{" Standard I/O demonstration " system "rx ARx_IactExamples.rexx ShowStdIO" } @{" Break-key demonstration " system "rx ARx_IactExamples.rexx DoBreak" } @{fg highlight}Techniques:@{fg text} @{i}Strings@{ui} @{" CountChar(): count characters with COMPRESS() " link ARx_Tknq.ag/COUNTCHAR()} @{" CountWords(): count words in a file " link ARx_Tknq.ag/COUNTWORDS()} @{" Format data into table form " link ARx_Tknq.ag/FORMATNOTE} @{" Format(): round and format a number " link ARx_Tknq.ag/FORMAT()} @{" AddComma(): add commas to an integer " link ARx_Tknq.ag/ADDCOMMA()} @{" Alternative: add commas within a loop " link ARx_Tknq.ag/ADDCOMMAALT} @{" WordWrap(): wordwrap text to a defined length " link ARx_Tknq.ag/WORDWRAP()} @{" ParseFileName(): split name of file from path " link ARx_Tknq.ag/FILENAME} @{i}Input/Output@{ui} @{" Open console windows for I/O " link ARx_Tknq.ag/CONWINDOW} @{" Output text to a printer " link ARx_Tknq.ag/PRINTTEST} @{" Read data from one file, write to another " link ARx_Tknq.ag/INOUTFILE} @{" Retrieve result of AmigaDOS command " link ARx_Tknq.ag/READCMD} @{" Getting and sending message packets " link ARx_Tknq.ag/PORTXMP} @{i}Data storage and retrieval@{ui} @{" Store global variables on the clip list " link ARx_Tknq.ag/CLIPLIST} @{" Get and set environmental variables " link ARx_Tknq.ag/GETSETENV} @{" Retrieve data from source code " link ARx_Tknq.ag/INLDATA} @{" Create a data scratchpad with PUSH, QUEUE, and PULL " link ARx_Tknq.ag/SCRATCHPAD} @{" SeekToRecord(): pull single record from data file " link ARx_Tknq.ag/SEEKTORECORD()} @{" Use VALUE() to create interpreted variable names " link ARx_Tknq.ag/VALUENOTE} @{" Check unique datatypes with VERIFY() " link ARx_Tknq.ag/VERIFYNOTE} @{" Determine version number of any library " link ARx_Tknq.ag/LIBVER()} @{fg highlight}Basic Elements:@{fg text} @{" Structure of an ARexx program " link ARx_Elements.ag/STRUCTURE} @{" Tokens " link ARx_Elements.ag/TOKEN} @{" Comment tokens " link ARx_Elements.ag/COMMENT} @{" String tokens " link ARx_Elements.ag/STRING} @{" Hex and binary strings " link ARx_Elements.ag/HEXSTRING} @{" Symbol tokens " link ARx_Elements.ag/SYMBOL} @{" Fixed symbols " link ARx_Elements.ag/CONSTANT} @{" Variable symbols " link ARx_Elements.ag/VARSYMBOL} @{" Operator tokens " link ARx_Elements.ag/OPERATOR} @{" Concatenation || " link ARx_Operator.ag/CONCATENATION} @{" Arithmetic + - | / // % " link ARx_Operator.ag/ARITHMETIC} @{" Comparative < > = == >= <= " link ARx_Operator.ag/COMPARISON} @{" Logical & | && ~ " link ARx_Operator.ag/LOGICAL} @{" Reserved characters " link ARx_Elements.ag/SPECCHAR} @{" The comma: Continuation character " link ARx_Elements.ag/COMMA} @{" The semicolon: Clause end symbol " link ARx_Elements.ag/SEMICOLON} @{" Using semicolons for in-line scripts " link ARx_Elements.ag/INLINE} @{" The colon: Label identifier " link ARx_Elements.ag/LABELID} @{" Parenthesis: Grouping / Function argument list " link ARx_Elements.ag/PAREN} @{" Expressions " link ARx_Elements2.ag/EXPRESSION} @{" Numbers " link ARx_Elements2.ag/NUMBER} @{" Numeric precision " link ARx_Elements2.ag/PRECISION} @{" Strings " link ARx_Elements2.ag/STRINGEXPR} @{" Treating numbers as strings " link ARx_Elements2.ag/NUMASTEXT} @{" Variables " link ARx_Elements2.ag/VARIABLE} @{" Using variables " link ARx_Elements2.ag/VARDES} @{" Compound variables " link ARx_Elements2.ag/COMPVAR} @{" Overview: Using compound variables " link ARx_Elements2.ag/COMPVAR1} @{" Stem variables " link ARx_Elements2.ag/COMPVAR2} @{" Extending stem variables " link ARx_Elements2.ag/COMPVAR3} @{" Substituting values in compound variables " link ARx_Elements2.ag/COMPVAR4} @{" Using strings as the derived name of a branch " link ARx_Elements2.ag/COMPVAR5} @{" Setting default value of a compound variable " link ARx_Elements2.ag/COMPVAR6} @{" Finding values in a compound variable " link ARx_Elements2.ag/COMPVAR7} @{" Special variables " link ARx_Elements2.ag/SPECVAR} @{" RC " link ARx_Elements2.ag/RC} @{" RESULT " link ARx_Elements2.ag/RESULT} @{" SIGL " link ARx_Elements2.ag/SIGL} @{" 'Natural' data typing in ARexx " link ARx_Elements2.ag/VARTYPE} @{" Function calls " link ARx_Elements3.ag/FUNCTION} @{" Internal functions " link ARx_Elements3.ag/PROGFUNC} @{" Built-in functions " link ARx_Elements3.ag/BLTFUNC} @{" Library/Host functions " link ARx_Elements3.ag/LIBFUNC} @{" External functions " link ARx_Elements3.ag/EXTFUNC} @{" Function arguments " link ARx_Elements3.ag/FUNCARG} @{" Operations " link ARx_Elements3.ag/OPERATION} @{" Concatenation " link ARx_Operator.ag/CONCATENATION} @{" Arithmetic " link ARx_Operator.ag/ARITHMETIC} @{" Comparative " link ARx_Operator.ag/COMPARISON} @{" Logical " link ARx_Operator.ag/LOGICAL} @{" Conditional expressions " link ARx_Elements3.ag/CONDITIONAL} @{" Avoiding accidental commands from expressions " link ARx_Elements3.ag/ACICMD} @{" Clauses " link ARx_Elements3.ag/CLAUSE} @{" Assignment clauses " link ARx_Elements3.ag/ASSIGNMENT} @{" Instructions " link ARx_Elements3.ag/INSTRUCTION} @{" Command clauses " link ARx_Elements3.ag/COMMAND} @{" Command host: what is it? " link ARx_Elements3.ag/HOST} @{" The default host " link ARx_Elements3.ag/DEFHOST} @{" Determining the initial host " link ARx_Elements3.ag/INITHOST} @{" Entering commands in a script " link ARx_Elements3.ag/CMDSTRING} @{" Example script " link ARx_Elements3.ag/TTXCOMMAND} @{" Label clauses " link ARx_Elements3.ag/LABEL} @{" Null clauses " link ARx_Elements3.ag/NULL} @{fg highlight}Instruction keywords:@{fg text} @{" ADDRESS " link ARx_Instr.ag/ADDRESS} @{" ARG " link ARx_Instr.ag/ARG} @{" BREAK " link ARx_Instr.ag/BREAK} @{" Breaking structure " link ARx_Instr.ag/BREAKSTRUCT} @{" CALL " link ARx_Instr.ag/CALL} @{" DO " link ARx_Instr.ag/DO} @{" " link ARx_Instr.ag/DOOPT1} @{" Index variable/TO/BY " link ARx_Instr.ag/DOOPT2} @{" FOR " link ARx_Instr.ag/DOOPT3} @{" WHILE/UNTIL " link ARx_Instr.ag/DOOPT4} @{" FOREVER " link ARx_Instr.ag/DOOPT5} @{" END " link ARx_Instr.ag/END} @{" DROP " link ARx_Instr.ag/DROP} @{" ECHO " link ARx_Instr3.ag/SAY} @{" EXIT " link ARx_Instr.ag/EXIT} @{" IF " link ARx_Instr.ag/IF} @{" ELSE " link ARx_Instr.ag/IF} @{" INTERPRET " link ARx_Instr.ag/INTERPRET} @{" ITERATE " link ARx_Instr.ag/ITERATE} @{" LEAVE " link ARx_Instr.ag/LEAVE} @{" NOP " link ARx_Instr.ag/NOP} @{" NUMERIC " link ARx_Instr2.ag/NUMERIC} @{" OPTIONS " link ARx_Instr2.ag/OPTIONS} @{" PARSE " link ARx_Instr2.ag/PARSE} @{" ARG " link ARx_Instr2.ag/PARSESRC1} @{" EXTERNAL " link ARx_Instr2.ag/PARSESRC3} @{" NUMERIC " link ARx_Instr2.ag/PARSESRC4} @{" PULL " link ARx_Instr2.ag/PARSESRC2} @{" SOURCE " link ARx_Instr2.ag/PARSESRC5} @{" VALUE WITH " link ARx_Instr2.ag/PARSESRC7} @{" VAR " link ARx_Instr2.ag/PARSESRC8} @{" VERSION " link ARx_Instr2.ag/PARSESRC6} @{" Templates " link ARx_Instr2.ag/PARSETMP1} @{" Tokenization " link ARx_Instr2.ag/PARSETMP2} @{" The period: Placeholder token " link ARx_Instr2.ag/PARSETMP2 46} @{" Pattern markers " link ARx_Instr2.ag/PARSETMP3} @{" Positional markers " link ARx_Instr2.ag/PARSETMP4} @{" Using variables as template markers " link ARx_Instr2.ag/PARSETMP5} @{" Combining different types of markers " link ARx_Instr2.ag/PARSETMP6} @{" Using multiple templates " link ARx_Instr2.ag/PARSETMP7} @{" ARexx departures from REXX-standard PARSE " link ARx_Instr2.ag/NONSTDPARSE} @{" PROCEDURE " link ARx_Instr3.ag/PROCEDURE} @{" EXPOSE " link ARx_Instr3.ag/EXPOSE} @{" PULL " link ARx_Instr3.ag/PULL} @{" PUSH " link ARx_Instr3.ag/PUSH} @{" QUEUE " link ARx_Instr3.ag/QUEUE} @{" PUSH, QUEUE and REXX data-stream I/O " link ARx_Instr3.ag/PUSHNOTE} @{" RETURN " link ARx_Instr3.ag/RETURN} @{" SAY " link ARx_Instr3.ag/SAY} @{" SELECT " link ARx_Instr3.ag/SELECT} @{" WHEN " link ARx_Instr3.ag/WHEN} @{" OTHERWISE " link ARx_Instr3.ag/OTHERWISE} @{" SIGNAL " link ARx_Instr3.ag/SIGNAL} @{" ON | OFF " link ARx_Instr3.ag/SIGTRAP} @{" BREAK_C " link ARx_Instr3.ag/BREAK_C} @{" | BREAK_D " link ARx_Instr3.ag/BREAK_} @{" | BREAK_E " link ARx_Instr3.ag/BREAK_} @{" | BREAK_F " link ARx_Instr3.ag/BREAK_} @{" ERROR " link ARx_Instr3.ag/ERROR} @{" FAILURE " link ARx_Instr3.ag/FAILURE} @{" HALT " link ARx_Instr3.ag/HALT} @{" IOERR " link ARx_Instr3.ag/IOERR} @{" NOVALUE " link ARx_Instr3.ag/NOVALUE} @{" SYNTAX " link ARx_Instr3.ag/SYNTAX} @{"