en:pfw:pseudocode
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:pfw:pseudocode [2023-09-04 18:17] – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | en:pfw:pseudocode [2023-09-04 18:17] (current) – ↷ Seite von pfw:pseudocode nach en:pfw:pseudocode verschoben uho | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== Pseudo Code ===== | ||
| + | Pseudo Code descirbes an algorithm using some invented syntax that does not need to be a concrete syntaxx of an existing system. All that matters is to explain the algorthmic idea. | ||
| + | |||
| + | We tend to use pseudocode like this: | ||
| + | |||
| + | //Use pseudo code following this style:// | ||
| + | |||
| + | < | ||
| + | Function: «name» ( input parameters -- results ) | ||
| + | «prose text descripting operations in this function» | ||
| + | |||
| + | Set «variable» to «description of value» | ||
| + | «imperative subject object ...» | ||
| + | | ||
| + | IF: «condition»: | ||
| + | ... | ||
| + | ELSE: | ||
| + | ... | ||
| + | | ||
| + | WHILE: «condition»: | ||
| + | | ||
| + | </ | ||
| + | |||
| + | //For defining words use:// | ||
| + | |||
| + | < | ||
| + | | ||
| + | Define: ( u -- ) | ||
| + | Reserve RAM space | ||
| + | allocate ROM space | ||
| + | Action: ( -- a ) | ||
| + | Leave start address of this | ||
| + | </ | ||