Zusammenfassung der Ressource
Raptor
- Visual programming
development environment
- Based on flowcharts
- Why use it?
- Minimizes the amount of syntax
you must learn
- Easy of use
- Error messages easy to understand
- Doesn´t require a heavy-weight commercial programming language
- For example
- C++
- Java
- Symbols
- Start
- End
- Loop
- Call
- Input
- Output
- Selection
- Processing
- Variables
- Only holds a single value
- The value can change as a program
excecutes
- Ways to set or change a variable
- By the value entered in an input statement
- By the value calculated from an
ecuation in an assignment statement
- By a return value from a procedure call
- Poor variables names
- Examples
- a
- Not descriptive
- Milesperhour
- Add underscores
- My4to
- Not descriptive
- Illegal variables names
- Examples
- 4sale
- Doen´t start with a letter
- Sales tax
- Includes a space
- Sales$
- Includes invalid character
- Good varible names
- Examples
- Tax_rate
- Sales_tax
- Distance_in_miles
- Mpg
- Common errors
- "Variable ____ does not
have a value"
- Common reasons
- The variable has not been given a value
- The variable name was misspelled
- "Can't assign string to numeric variable _____"
"Can't assign numeric to string variable _____"
- If the statements attempt to change
the data type of a variable.
- Operations
- +
- Addition
- -
- Subtraction
- Negation
- *
- Multiplication
- /
- Division
- ^
**
- Exponentiation, raise a
number to a power
- rem
mod
- Remainder when the right operand
divides the left operand
- sqrt
- Square root
- log
- Natural
logarithm
(base e)
- abs
- Absolute value
- ceiling
- Rounds up to a
whole number
- floor
- Rounds down to
a whole number
- sin
- trig sin(angle_in_radians)
- cos
- trig cos(angle_in_radians)
- tan
- trig tan(angle_in_radians)
- cot
- trig cotangent(angle_in_radians)
- arcsin
- trig sin-1(expression), returns radians
- arcos
- trig cos-1(expression), returns radians