Chapter 6 Graphics And Colour - Commodore 16 User Manual

Hide thumbs Also See for Commodore 16:
Table of Contents

Advertisement

GRAPHICS
AND
COLOUR
• Graphics characters
• Character animation
• Controlling colours
• High resolution graphics
• Points, lines. and labels
• Squares, circles, polygons, and painting
I
I
I 1 I
I
I
I
I
I
f
I
I
I
I
• Multi-colour graphics
You could also include one of the functions in a program line. as the
following example shows:
10 FOR Xn 110 5
20 PRINT "THE SQUARE ROOT OF"; X; "IS"; SQR(X)
30 NEXT X
CHAPTER 6
You'll find a complete listing of the numeric functions in the BASIC
Encyclopedia in the back of this manual.
NOTE: Most commands have an abbreviation that you can type
instead of typing out the entire BASIC name. Your Commodore 16
interprets the abbreviation exactly as It would read the full name. An
example of an abbreviation is as follows.
L then
an
0 prints L
r
on your screen
Your computer reads this as if you'd typed out LOAD. Abbreviations
are useful as a timesaver. There is a complete list of the accepted
abbreviations in the BASIC Encyclopedia.
User Defined Functions
An effective way to use your computer's math capability is to create
user defined functions. User defined functions are extremely useful in
calculations, and easy to implement using your Commodore 16. User
defined functions allow you to program a formula, and then let your
computer plug in values to be calculated. This can be used for many
different purposes.
Here Is a statement utilizing the user defined function for calculating the
value of a secant:
10 DEP' FNS(X)
This figures out the value of the secant of any number entered for X.
FNS is the name of the function defined by this statement. Appendix C
contains a table of mathematical functions not included in your
computer's BASIC language.
User defined functions save memory space when you would use a
function more than once, and make your programs easier to read and
understand.
62
63

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Commodore 16 and is the answer not in the manual?

Questions and answers

Table of Contents