Manual

Pseudocode manual for practical writing.

A managed reference for the syntax, control flow, and tracing habits used across PseudoEditor. Keep it open beside the browser editor while you practise.

Core syntax

Use DECLARE, assignment, INPUT, OUTPUT, comments, constants, and typed values in a consistent exam-style format.

  • Assignment uses <-
  • Variables use explicit types
  • Comments start with //

Selection and loops

Pick IF, CASE, FOR, WHILE, or REPEAT UNTIL based on when the condition is known and when it should be tested.

  • FOR for known counts
  • WHILE can run zero times
  • REPEAT UNTIL runs first

Arrays and records

Represent list-style data with indexed arrays, then process values through counted loops and clear bounds.

  • Indexes are explicit
  • Bounds are part of declaration
  • Nested loops cover tables

Tracing and debugging

Use trace tables, line-by-line state changes, and compiler diagnostics to catch logic and syntax errors earlier.

  • Track changed variables
  • Check block endings
  • Test edge cases

Examples

Small patterns you can run.

Counted total

DECLARE Number : INTEGER
DECLARE Total : INTEGER
Total <- 0

FOR Number <- 1 TO 5
    Total <- Total + Number
NEXT Number

OUTPUT "Total = ", Total

Input validation

DECLARE Choice : INTEGER

REPEAT
    OUTPUT "Choose 1 to 4"
    INPUT Choice
UNTIL Choice >= 1 AND Choice <= 4

OUTPUT "Accepted"

Before you submit

A compact checking routine.

Treat the manual as a working checklist, not a long rules page. Write the algorithm, run it, then trace the parts that change state.

  • Declare every variable and array before use.
  • Initialize totals, counters, and flags before loops.
  • Use the loop type that matches the question.
  • Close every IF, CASE, and loop block clearly.
  • Trace the program with at least one normal input and one edge case.