Gaddis Formatting
Gaddis Keywords
| AppendMode | Call | Case | Class | Close |
| Constant | Declare | Default | Delete | Display |
| Do | Else | End | For | For Each |
| Function | If | In | Input | Module |
| New | Open | Private | Public | Read |
| Rename | Select | Set | Then | To |
| Until | While | Write |
Variables
Data Types
| Integer | Real | String | Character |
Examples:
Declare <DataType> <VariableName>
Declare Integer num
or
Declare Integer num = 2
Declare Real decimalNum = 2.3
Declare String someLetters = "I AM A STRING VARIABLE, YAAAAAAAY!"
Declare Character grade = "A"
Declare <DataType> <ArrayName>[Size]
Declare String myStringArray[5]
Constants
Constant <DataType> <Name> = <Value>
Constant String coolStuff = "Sooper cool constant"
Comments
Two forward slashes before text indicates a comment.
Examples:
//Example.java
//John Smith
Operators
Mathematical
| + (Add) | - (Subtract) | * (Multiply) |
| / (Divide) | % (Modulus) | ^ (Exponent) |
Relational
| > (Greater than) | < (Less than) |
| >= (Greater than or equal to) | <= (Less than or equal to) |
| == (Equal to) | != (Not equal to) |
Logical
| AND | OR | NOT |
Conditional Statements
If Statements
If Else Statements
Select Statements
Loop Statements
While Loop
Do While Loop
Do Until Loop
For Loop
For Each Loop
Subroutines
Modules
Functions
Remember a function must return a value.
Classes
Indentation
Psucculint checks for proper indentation of pseudocode.
Your indentation should be between 4-5 spaces for each nested statement.
Remember your indentation should be the same on the statements end statement.
(The opening If should have a closing End If at the same indentation)