Skip to content

Commit 90e24ba

Browse files
fix edit syntax
1 parent 8af6c90 commit 90e24ba

1 file changed

Lines changed: 10 additions & 34 deletions

File tree

BASIC_BEGINNER.md

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ We’ll start simple and build up.
1717
Open the editor:
1818

1919
```
20-
edit hello
20+
edit
2121
```
2222

23-
Type this and save (Ctrl+S):
23+
Type this and save (Ctrl+S) with the name: `hello`
2424

2525
```
2626
PRINT "Hello, Retro Rocket!"
@@ -46,10 +46,10 @@ You should see the message appear. That’s your first program!
4646
Open a new file:
4747

4848
```
49-
edit mathsdemo
49+
edit
5050
```
5151

52-
Type and save:
52+
Type and save (Ctrl+S) as `mathsdemo`:
5353

5454
```
5555
A = 2
@@ -84,10 +84,10 @@ Use the right suffix when you want a real or string. Integers have no suffix.
8484
Open:
8585

8686
```
87-
edit hello_you
87+
edit
8888
```
8989

90-
Type and save:
90+
Type and save (Ctrl+S) as `hello_you`:
9191

9292
```
9393
PRINT "What is your name?"
@@ -113,10 +113,10 @@ hello_you
113113
Open:
114114

115115
```
116-
edit agegate
116+
edit
117117
```
118118

119-
Type and save:
119+
Type and save (Ctrl+S) as `agegate`:
120120

121121
```
122122
PRINT "How old are you?"
@@ -137,24 +137,14 @@ Run it and try different ages.\
137137

138138
**A counting loop**
139139

140-
```
141-
edit count
142-
```
143-
144140
```
145141
FOR I = 1 TO 5
146142
PRINT "Number "; I
147143
NEXT
148144
```
149145

150-
Run with `count`.
151-
152146
**A condition‑driven loop**
153147

154-
```
155-
edit countdown
156-
```
157-
158148
```
159149
N = 5
160150
WHILE N > 0
@@ -164,8 +154,6 @@ ENDWHILE
164154
PRINT "Lift‑off!"
165155
```
166156

167-
Run with `countdown`.
168-
169157
---
170158

171159
## 6) Breaking code into procedures and functions
@@ -174,10 +162,6 @@ Procedures are reusable blocks that don’t return a value. Functions return a v
174162

175163
**Procedure example**
176164

177-
```
178-
edit greet
179-
```
180-
181165
```
182166
DEF PROC Greet(NAME$)
183167
PRINT "Hello, "; NAME$
@@ -187,23 +171,15 @@ PROC Greet("Ada")
187171
PROC Greet("Grace")
188172
```
189173

190-
Run with `greet`.
191-
192174
**Function example**
193175

194-
```
195-
edit add
196-
```
197-
198176
```
199177
DEF FN Add(A, B)
200178
= A + B
201179
202180
PRINT "2 + 3 = "; FN Add(2, 3)
203181
```
204182

205-
Run with `add`.
206-
207183
**Notes**
208184

209185
- Call a procedure with `PROC Name(...)`.
@@ -215,10 +191,10 @@ Run with `add`.
215191
## 7) A tiny project: Guess the number
216192

217193
```
218-
edit guess
194+
edit
219195
```
220196

221-
Type and save:
197+
Type and save (Ctrl+S) as `guess`:
222198

223199
```
224200
PRINT "I am thinking of a number between 1 and 10."

0 commit comments

Comments
 (0)