Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
null

null

Ratings: (0)|Views: 86 |Likes:
Published by api-26077977

More info:

Published by: api-26077977 on Jun 09, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/08/2012

pdf

text

original

 
ICS2O1 Review Topics
Ch. 4 SIMPLE PROGRAMS
Integers and real numbersArithmetic expressionsCombining calculations and messagesOutput of a series of itemsA series of output statements
Ch.5 VARIABLES AND CONSTANTS
Declaring variablesNames of variablesInputting character stringsStrings containing blanksMistakes in programsInputting numbersMistakes in dataInputting real numbersConstantsAssignment of values to variablesUnderstandable programsComments in programs
Ch.6 REPETITION
LoopsConditional loopsComparisonsComparing stringsCounted loopsCounting in multiplesLoops that count backwardsCounted loops with exitsRandom exit from loopCompound conditions
Ch.7 CHARACTER GRAPHICS
Character locations in the executionwindowCreating a graphical pattern withcharactersInteractive graphicsDiagonal lines and patternsDrawing in colorBackground colorHiding the cursorAnimation with graphicsControlling the speed of animationPausing for user input
Ch.8 PIXEL GRAPHICS
Pixel positions in the execution windowPlotting dots in the execution windowChanging the execution window sizeDrawing linesDrawing circles and ellipsesAnimationDrawing arcsPlotting a mathematical functionUsing text with pixel graphicsBackground colorSound with graphics
Ch.9 SELECTION
Simple selection Three-way selectionMulti-way selectionCase constructCommands for actionSelecting from a menu of commands
Input / Output Statements
 put
 putItem
{,
 putItem
} [..]
get
getItem
{,
getItem
}
Declarations
const
id 
[:
dataType]:= initializing Value
 var
id{, id]: dataType [:= initializingValue]
Data types
int, real, string
Control Constructs
Any number of 
exit
and
exit when
constructs can appear at any place inside
for .. end for
constructs and
loop .. end loop
constructs.
FORfor
 
[decreasing
 
]
 
variable
 
:
 
startValue
 
..
 
endValue
[ by
increment
]
 
... statements ...
exit when
expn
...statements ...
end forLOOP loop
... statements ...
exit when
expn
... statements ...
end loopIFif
 
condition
 
then
... statements ...
{ elsif
condition
then
... statements ...
}[ else
... statements ...
]end ifCASEcase
expn
of{ label
expn
{ ,
expn
} :
... statements ...
}[ label :
... statements ...
]end case
Graphics
maxx 
:
int
Maximum value of 
 x
in current pixel graphics mode. For CGA,
maxx
= 319.
maxy 
:
int
Maximum value of 
 y
in current pixel graphics mode. For CGA,
maxy
= 199
cls
Clears the screen and places cursor at point whose screen coordinates are (1, 1). In pixelgraphics mode, clears the screen and changes screen to current background color.
color 
(
colorNumber 
:
int
)
Sets color for text to be displayed.
colorback
(
colorNumber 
:
int
)
Sets color of the background on which text is to be displayed.
colorback
(
colorNumber 
:
int
)
Sets current background color of text displayed. The default background color is white.
drawdot
(
x, y, color 
:
int
)
Sets a dot (pixel) of 
color 
at point (
 x, y
).
drawline
(
x1, y1, x2, y2, color 
:
int
)
Draws a line in
color 
from (
 x1, y1
) to (
 x2, y2
).
drawbox 
(
x1, y1, x2, y2, color 
:
int
)
Draws a rectangle in
color 
with sides parallel to the axes, bottom left corner at (
 x1, y1
), andupper right corner at (
 x2, y2
).
drawfillbox 
(
x1, y1, x2, y2, color 
:
int
)
Draws a filled in rectangle in
color 
with sides parallel to the axes, bottom left corner at (
 x1, y1
), and upper right corner at (
 x2, y2
).
drawoval
(
xCenter, yCenter, xRadius, yRadius, color 
:
int
)
Draws an oval in
color 
with center at (
 xCenter, yCenter 
), horizontal distance to oval
 xRadius
,vertical distance
 yRadius
.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->