Action! › and› BBS Express! PRO› Tutorial›› by› Thomas M. Johnson ››› Available from ›› Villa Video's Bargain Cellar › (414) 265-5149 › ExpressNet Node X11 ››Action! is copyright of ACS, OSS, ICD.›BBS Express! PRO is copyright Orion›Micro Systems.› ›This tutorial is copyright Thomas M.›Johnson.››This tutorial can be distributed under›the following conditions:› 1) It is free.› 2) All of the above› information is intact.››--------------------------------------›››Welcome to the Action!/PRO tutorial.›In it, I plan to teach you how to›write command modules for BBS Express!›PRO. But to write these, you must›know the Action! programming language.›So this is a 2 for the price of 1›tutorial.››I strongly suggest you print the files›of this tutorial out. There are a›number of programs that accompany the›text part (the part you are reading›now) and smaller program included in›the text part that may take a long›explanation. So instead of trying›to view this on the screen and ›paging around looking for what I am›talking about, having it on paper›would make things easier.›››First thing you should do is turn on›your computer with the Action! ›cartridge plugged in.››You should see a flashing cursor in ›the upper left hand corner of the›screen and the words "ACTION! (c)›1983 ASC" in inverse letters at the›bottom. This is the EDITOR mode.›This is where you enter and edit your›program. The Action! editor is very›versitile. I am using it right now›to write this tutorial.››I guess we should start with the›"standard" first program that you see›in ANY book that teaches a programming›language. The infamous "Hello, World"›example.››To set aside parts of this text that›should be entered into the editor, I›will indent from here on in.››› PROC main()›› PrintE("Hello, World")›› RETURN››OK, so now what does it mean? The ›word PROC is a Action! reserved word›(that means you can't name a variable,›procedure or function that name).››PROC is short for PROCedure and that›simply means it is a section of code.››The word "main" comes down to us from›the language C. A short digression is›needed. In the language Pascal, the›last procedure is the controlling›procedure. It can calls all the other›procedures and it is not named.››In C, the controlling procedure is ›the one called "main". But it can›be anywhere in the program.››In Action!, we compromise. It is ›named like C, but it must be last›like Pascal. But in Action!, we don't›have to call it "main", we can call›it anything we want. But most ›programmers call it main.››Then comes the "()". This mean there›are no parameters. The main PROC›can NEVER have any parameters. If ›you are wondering what parameters are,›we will cover them in a later lesson.››Next is the "PrintE()" line. This›is part of the Action! library. It›prints what ever is between the quotes›and puts the cursor on the left side›of the screen on the next line down.››Why is the PrintE() line indented?›In Action!, indention and capitalization›do nothing. "PRINTE()", "printe()"›and "PrintE()" are exactly the same›thing. But to keep programs from›1 programmer to another looking the›same, the "PrintE" is used. And it ›is indented to show that it belongs to›the PROCecude "main".››Lastly, is the word "RETURN". This ›signifies the end of a procedure.›When it occures at the end of the›"main" procedure, your program›returns control back to the Action!›cartridge.››How do you run this program? When›it is typed into the editor exactly›as shown, you press the CONTROL key,›the SHIFT key and the M key at the›same time (I will abrieviate this as›M).››You will hear a buzz and the screen ›will go blank. There will be a›inverse line at the top of the screen.›You are now in the MONITOR mode. From›here you must Compile your program.››You press C then the RETURN key. If›there are errors, you will get a›message telling you so. If you have›errors, press E and the RETURN key›to go back to the Editor. If not,›you press R and the RETURN key to›Run you program.››This is a good place to end lesson›one. If you want to experiment until›the next lesson, try adding some more›PrintE lines in the program. Like:›› PROC main()›› PrintE("Hello World!")› PrintE("I am programming in")› PrintE("Action!")›› RETURN››Until the next lesson...››