Files
Claro/docs/QUICK_START.md
Hermes Agent d555071406 fix: stabilize learning path, reliability and legacy Windows builds
Unify beginner syntax while preserving compatibility, repair ownership and parser guards, add verified distribution tooling and VC6 Windows 98 build inputs, and clarify documentation and release status. Preserve DOS build-input line endings and exclude generated binaries/caches.
2026-10-20 22:40:19 +00:00

1.8 KiB

Claro Quick Start Guide

Programming Made Simple

What is Claro?

Claro is a small scripting language designed for beginners. It uses readable commands like SAY, ASK, SET, and TEACH.

Before you start

Build Claro with make from the project folder, or use its C89 build command in the README. Save the first example below as hello.claro in that folder. Run the command shown beneath it. Try the later examples one at a time, saving your changes before running again.

Use one spelling throughout these lessons: short ASK and SET, TEACH with DO, and END for choices, counted loops, and functions. The syntax guide keeps these rules in one place.

1. Show a message

SAY "Hello!"

Run it:

./claro hello.claro

2. Ask a question

ASK "What is your name?" name
SAY "Hello " + name

3. Remember information

SET score 10
SAY score

4. Make a choice

SET score 8

IF score >= 5
    SAY "Good job!"
ELSE
    SAY "Try again."
END

5. Repeat something

DO 3 TIMES
    SAY "Practice"
END

6. Use a list

SET items LIST
ADD "milk" TO items
ADD "bread" TO items

FOR EACH item IN items
    SAY item
END

7. Teach a function

TEACH greet name
    RETURN "Hello " + name
END
DO greet "Alex"
SAY RESULT

8. Save a file

WRITE FILE "note.txt" WITH "Hello from Claro"
READ FILE "note.txt" AS note
SAY note

Good first project: a quiz

SAY "Tiny Quiz"
ASK "What is 2 + 2?" answer

IF answer = 4
    SAY "Correct!"
ELSE
    SAY "The answer is 4."
END

Tips

  • Use SAY to show information.
  • Use ASK to get information.
  • Use SET to remember information.
  • Use IF when the program needs to choose.
  • Use DO or FOR when something repeats.
  • Use TEACH to make reusable code.