What is an array?
It's a set of values (numbers or strings) with one name.
You can also think of an array as a single variable with multiple slots for values.
Array Terms and Indexing
Arrays are found in all programming languages, including RAPTOR. The individual values of an array are called the elements of the array. Elements are assigned (and retrieved) by their index number inside square brackets [ ]. In RAPTOR, the first element is index 1, the second element is index 2, and so on.
CGS1000 (at SPC)
Help with RAPTOR programming.
Monday, December 19, 2011
Saturday, December 17, 2011
Adding Subcharts to RAPTOR Programs
What is a subchart in RAPTOR?
A subchart is just a separate set of RAPTOR symbols in a program. A subchart has a start symbol and an end symbol just like the "main" program. A subchart can be made to run with a Call symbol from main or from another subchart. Subcharts are used to modularize RAPTOR programs. A long or complex RAPTOR program can be organized into several subcharts. It's a "divide and conquer" approach to programming. Subcharts provide another benefit, too. They can be called over and over again as many times as needed.
How do you make subcharts?
A subchart is just a separate set of RAPTOR symbols in a program. A subchart has a start symbol and an end symbol just like the "main" program. A subchart can be made to run with a Call symbol from main or from another subchart. Subcharts are used to modularize RAPTOR programs. A long or complex RAPTOR program can be organized into several subcharts. It's a "divide and conquer" approach to programming. Subcharts provide another benefit, too. They can be called over and over again as many times as needed.
How do you make subcharts?
Friday, October 28, 2011
Algorithms & Pseudocode
"It's the question that drives us, Neo. It's the question that brought you here."
_Trinity (The Matrix)
What is an Algorithm?
An algorithm is an ordered sequence of steps guaranteed to solve a specific problem. If that sounds like the definition for a computer program...it is! Programmers develop algorithms when they develop computer applications. It's a crucial problem-solving skill that demands critical thinking. It takes time, and many programs, to become truly proficient but there are procedures that can help with creating an algorithm:
What is an Algorithm?
An algorithm is an ordered sequence of steps guaranteed to solve a specific problem. If that sounds like the definition for a computer program...it is! Programmers develop algorithms when they develop computer applications. It's a crucial problem-solving skill that demands critical thinking. It takes time, and many programs, to become truly proficient but there are procedures that can help with creating an algorithm:
Tuesday, October 18, 2011
RAPTOR SKILL - Procedures
A simple RAPTOR program has just one set of symbols in a tab called main. More advanced RAPTOR programs have additional sets of symbols, each in its own named tab. These additional sets can be either subcharts or procedures. This posting concerns procedures. Procedures are termed functions or subroutines in some other programming languages. What makes a procedure special is that it...
Monday, October 17, 2011
Payroll Programs with Overtime
About Overtime
Florida law requires that certain workers earning more than minimum wage be paid 1.5 times their normal wage (called "time and a half") for any hours in excess of 40 hours in one week. Florida does not have a daily limit. Here are a few weekly pay calculations for workers earning $10/hr and qualifying for time and a half:
Florida law requires that certain workers earning more than minimum wage be paid 1.5 times their normal wage (called "time and a half") for any hours in excess of 40 hours in one week. Florida does not have a daily limit. Here are a few weekly pay calculations for workers earning $10/hr and qualifying for time and a half:
Sunday, October 16, 2011
RAPTOR SKILL - Modulus Operator - Part 2
It is suggested that you read Modulus Operator - Part 1 first.
You may not be aware of it, but you already know how to use the modulus operator. If you have ever made change (as cashiers do all the time), you are using the modulus operator. As an example, let's assume that you need to give a customer $0.93 in change. This would be your thinking, step by step:
You may not be aware of it, but you already know how to use the modulus operator. If you have ever made change (as cashiers do all the time), you are using the modulus operator. As an example, let's assume that you need to give a customer $0.93 in change. This would be your thinking, step by step:
RAPTOR SKILL - Modulus Operator - Part 1
Every programming language has a modulus operator. Curiously RAPTOR has two, mod and rem. They can be used interchangeably. But what does modulus do and why do we need it? It's used to find the remainder after a division. For example,
Subscribe to:
Posts (Atom)