Metal Reference
Metal Reference
Game Manuals · PDF
| Filename | metal_reference.pdf |
|---|---|
| Size | 0.20 MB |
| Subsection | Metal |
| Downloads | 1 |
Enjoying MacTrove?
Anonymous downloads are free and unlimited.
Create a free account to track favorites,
contribute metadata corrections, and join the
community chat.
Reader
Loading…
OCR / Text contents
METAL REFERENCE
This is METAL Reference , a brief tutorial in programming in METAL.
Enjoy,
Marin Saric
Remember, if you have any comments, questions or bug reports write to
sarimar@iit.edu
Galactic Dreams Software webpage:
<http://www.iit.edu/~sarimar/GDS>
If it looks like you already know what the chapter is talking about, keep scrolling down.
=================================================
*C* Contents
( a list of all the chapters )
=================================================
*1* BASIC stuff - (a quick start in BASIC language for those who don't know it)
*2* Programming Control - (flow of control and other programming things)
*3* Number Crunching - (Functions for manipulating numbers, math functions, etc.)
*4* String Functions - (Functions for manipulating and creating strings)
*5* Console I/O - (Simple Input/Output and other things about the METAL Console)
*6* System Stuff - (Interaction with METAL Runtime and MacOS)
*7* Files - (File manipulating commands)
*8* Graphics - (Graphics.)
*9* Sound - (Playing sounds and beeps; speech)
*10* QuickTime(TM) - (Commands for using this piece of technology.)
*11* Sprites -(For games. A little bit about those things from C64.)
*12* Direct Screen Access - (If you render a lot.)
=================================================
*1* BASIC stuff
( a quick start in BASIC language for those who don't know it )
=================================================
METAL is an extended variant of BASIC .
BASIC stands for Beginners All-purpose Symbolic Instruction Code.
What this means is that BASIC is supposed to be a simple language that any one can learn and use to
program pretty much anything.
If you never programmed in BASIC before, the best thing to do is to get a good book or a tutorial (there is
plenty on Internet) on any of the BASIC variants (QBasic, GWBasic, Chipmunk Basic, etc.) . In case you
are adventurous, however, here is a quick start in BASIC:
print "Hello my man!"
input "What is your name?"; name$
print "Nice to meet you, ";name$
This is a BASIC program . Programs are like cooking recipes or laundry-lists. You do them in order.
BASIC programs are also executed in order.
In METAL, you run programs with command-R, or by choosing Run from the project menu. Here is what
this program does when it's run.
(The things I type in the computer are underlined . )
Hello my man!
What's your name? Marin
Nice to meet you, Marin
There. Not so bad, huh?
print and input are commands .
name$ is a variable. In fact it is a string variable, because it contains characters. That's why it has a $ at
the end.
This makes sense. 'Print' and 'input' tell the computer what to do. Since print is tedious to write all the
time (and many programs output a lot of things to the screen), you can also write '?' :
? "hohohoooo..."
outputs
hohohoooo...
Sometimes you want the computer to decide what to do. Let's say you are ma…
Showing first 3,000 characters of 22,743 total. Open the full document →