TIP: Click on subject to list as thread! ANSI
echo: commo
to: MOSHE SEGAL
from: JIM BENNETT
date: 1995-06-20 19:48:00
subject: Writing Macros

Hi..
 MS> I asked on the list if a tutorial was available, and was pointed
 MS> to an archive from Ordata.com.  The problem is that it is already
 MS> assumed that the reader knows the language.
I wrote that tutorial, and frankly, am surprised at your "assumed the
reader knows the language" comment.  The tutorial starts out by
descibing the generic process of plotting out what you want a macro to
do, the importance of flowcharting the script (the *key* element in any
program), and then proceeds to describe individual macro commands and
how they might be used in a script.  The Macro Guide that Fred provides
gives the syntax for each command.  I attempted to flesh out the raw
syntax with some real-world applications of the syntax.
 MS> Is there any tutorial somewhere that begins at an elementary
 MS> level, and teaches the language bit by bit?
I doubt you'll be able to find anything like you're looking for.  If you
don't mind a suggestion, I think an elementary course on the general
concepts of Computer Programming would pay you more dividends.  Once you
have a basic grasp of how programs are structured, and why, then it's
possible to apply those general principles to any computer programming
language, including Commo's macro language.  My college courses (years
ago) in BASIC programming provided a firm foundation for my explorations
with {COMMO}.  There's a great deal of structural similarity, IMO,
between a {COMMO} script and a BASIC program.  The syntax differs, but
that's what the Macro Guide is used for.
Writing a {COMMO} script (or any program) is much like a game of chess.
In chess, the way that pieces can move can be easily described. Before
you can play a game of chess, you must know the basic rules for how the
pieces move.  Suppose, though, that you want to learn how to play chess
well.  A book that gives an analysis of various positions, games played
in the past, etc., may help to accelerate your understanding of the
game, but the bottom line is, you'd really need to play many games of
chess.
Similarly, before you write a {COMMO} macro, you must know the syntax
for the commands (the "how the pieces move).  The tutorial I wrote was
my stab at the "book that gives an analysis of various positions".  Now
the hard part is up to you..the "play many games of chess" part. Start
slowly..baby steps.  Take a few commands, learn what they do, what their
syntax is, and then actually apply them in a macro. Doesn't have to be
anything fancy, just enough for you to gain experience with the
commands.  Take it from my personal experience..this isn't really that
hard.  I'm not a computer programmer.  My formal education in
programming consists of two semesters of BASIC in the early 1970s.
Maybe I have a natural "knack" for programming..I can't say.  But I can
say that I was completely self-taught with {COMMO}'s scripts using
*only* the Macro Guide.  Based on my experience, I really, truely
believe that many others have the same abilities if they'd just set the
goal and go for it.
Jim
                                                                              
                                                                              
       
--- JCQWK
---------------
* Origin: Meredith Place Mail Drop (1:300/15)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.