Skip to content

Commit fcc50b3

Browse files
committed
feat: used correct prog lang identifier in the code blocks
1 parent 6ca9be2 commit fcc50b3

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

content/docs/_index.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Comprehensive guides and references for Pascal programming.
1414

1515
Pascal uses a clear, structured syntax that emphasizes readability:
1616

17-
```pascal
17+
```objectpascal
1818
program ExampleProgram;
1919
2020
const
@@ -63,7 +63,7 @@ end.
6363

6464
**Structured Types:**
6565

66-
```pascal
66+
```objectpascal
6767
{ Arrays }
6868
type
6969
TScores = array[1..10] of integer;
@@ -87,7 +87,7 @@ type
8787

8888
### File Operations
8989

90-
```pascal
90+
```objectpascal
9191
program FileExample;
9292
var
9393
inputFile, outputFile: text;
@@ -114,7 +114,7 @@ end.
114114

115115
### Dynamic Arrays
116116

117-
```pascal
117+
```objectpascal
118118
program DynamicArrayExample;
119119
type
120120
TIntArray = array of integer;
@@ -146,7 +146,7 @@ end.
146146

147147
### Object-Oriented Programming
148148

149-
```pascal
149+
```objectpascal
150150
program OOPExample;
151151
152152
type
@@ -214,14 +214,14 @@ end.
214214
### Code Style
215215

216216
1. **Use meaningful names:**
217-
```pascal
217+
```objectpascal
218218
var
219219
studentCount: integer; // Good
220220
sc: integer; // Avoid
221221
```
222222

223223
2. **Consistent indentation:**
224-
```pascal
224+
```objectpascal
225225
if condition then
226226
begin
227227
statement1;
@@ -230,7 +230,7 @@ end.
230230
```
231231

232232
3. **Comment your code:**
233-
```pascal
233+
```objectpascal
234234
{ Calculate compound interest }
235235
function CompoundInterest(principal, rate: real; years: integer): real;
236236
begin
@@ -240,7 +240,7 @@ end.
240240

241241
### Error Handling
242242

243-
```pascal
243+
```objectpascal
244244
program ErrorHandlingExample;
245245
var
246246
number, divisor: integer;
@@ -298,7 +298,7 @@ end.
298298
The System unit is automatically included and provides core functionality:
299299

300300
**Memory Management:**
301-
```pascal
301+
```objectpascal
302302
{ Dynamic memory allocation }
303303
var
304304
ptr: ^integer;
@@ -311,7 +311,7 @@ end;
311311
```
312312

313313
**String Functions:**
314-
```pascal
314+
```objectpascal
315315
program StringFunctions;
316316
var
317317
text: string;
@@ -334,7 +334,7 @@ end.
334334

335335
Provides extended system utilities:
336336

337-
```pascal
337+
```objectpascal
338338
uses SysUtils;
339339
340340
program SysUtilsExample;
@@ -364,7 +364,7 @@ end.
364364

365365
Mathematical functions and constants:
366366

367-
```pascal
367+
```objectpascal
368368
uses Math;
369369
370370
program MathExample;
@@ -391,7 +391,7 @@ end.
391391

392392
### Generic Programming
393393

394-
```pascal
394+
```objectpascal
395395
program GenericExample;
396396
397397
{$mode objfpc}
@@ -462,7 +462,7 @@ end.
462462

463463
### Interface Programming
464464

465-
```pascal
465+
```objectpascal
466466
program InterfaceExample;
467467
468468
{$mode objfpc}
@@ -551,7 +551,7 @@ end.
551551

552552
### Multi-threading
553553

554-
```pascal
554+
```objectpascal
555555
program ThreadExample;
556556
557557
{$mode objfpc}
@@ -613,7 +613,7 @@ end.
613613

614614
### SQLite Integration
615615

616-
```pascal
616+
```objectpascal
617617
program DatabaseExample;
618618
619619
{$mode objfpc}
@@ -684,7 +684,7 @@ end.
684684

685685
### Basic Form Application
686686

687-
```pascal
687+
```objectpascal
688688
unit MainForm;
689689
690690
{$mode objfpc}{$H+}
@@ -738,7 +738,7 @@ end.
738738

739739
### Memory Management Tips
740740

741-
```pascal
741+
```objectpascal
742742
program PerformanceExample;
743743
744744
type
@@ -778,7 +778,7 @@ end.
778778

779779
### Compiler Directives
780780

781-
```pascal
781+
```objectpascal
782782
program CompilerDirectives;
783783
784784
{$mode objfpc} // Object Pascal mode
@@ -814,7 +814,7 @@ end.
814814

815815
### Unit Testing Framework
816816

817-
```pascal
817+
```objectpascal
818818
program TestExample;
819819
820820
{$mode objfpc}

content/learn/_index.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Choose your Pascal development environment:
2929

3030
Create a new file called `hello.pas`:
3131

32-
```pascal
32+
```objectpascal
3333
program HelloWorld;
3434
begin
3535
writeln('Hello, Pascal World!');
@@ -50,7 +50,7 @@ fpc hello.pas
5050

5151
Every Pascal program follows this basic structure:
5252

53-
```pascal
53+
```objectpascal
5454
program ProgramName;
5555
5656
{ Variable declarations }
@@ -71,7 +71,7 @@ end.
7171

7272
Pascal has strong typing with these fundamental types:
7373

74-
```pascal
74+
```objectpascal
7575
var
7676
// Integer types
7777
age: integer;
@@ -93,7 +93,7 @@ var
9393

9494
**Conditional Statements:**
9595

96-
```pascal
96+
```objectpascal
9797
if age >= 18 then
9898
writeln('You are an adult')
9999
else
@@ -109,7 +109,7 @@ end;
109109

110110
**Loops:**
111111

112-
```pascal
112+
```objectpascal
113113
{ For loop }
114114
for i := 1 to 10 do
115115
writeln('Number: ', i);
@@ -132,7 +132,7 @@ until number > 0;
132132

133133
### Procedures
134134

135-
```pascal
135+
```objectpascal
136136
procedure greetUser(name: string);
137137
begin
138138
writeln('Hello, ', name, '!');
@@ -147,7 +147,7 @@ end.
147147

148148
### Functions
149149

150-
```pascal
150+
```objectpascal
151151
function calculateArea(radius: real): real;
152152
begin
153153
calculateArea := 3.14159 * radius * radius;
@@ -182,7 +182,7 @@ end.
182182
### Arrays and Data Structures
183183

184184
**Static Arrays:**
185-
```pascal
185+
```objectpascal
186186
program ArrayExample;
187187
var
188188
scores: array[1..5] of integer;
@@ -205,7 +205,7 @@ end.
205205
```
206206

207207
**Records (Structures):**
208-
```pascal
208+
```objectpascal
209209
program RecordExample;
210210
type
211211
TStudent = record
@@ -235,7 +235,7 @@ end.
235235
### File Input/Output
236236

237237
**Reading from Files:**
238-
```pascal
238+
```objectpascal
239239
program ReadFile;
240240
var
241241
inputFile: text;
@@ -259,7 +259,7 @@ end.
259259
```
260260

261261
**Writing to Files:**
262-
```pascal
262+
```objectpascal
263263
program WriteFile;
264264
var
265265
outputFile: text;
@@ -281,7 +281,7 @@ end.
281281

282282
### Error Handling
283283

284-
```pascal
284+
```objectpascal
285285
program ErrorHandling;
286286
var
287287
number, divisor: integer;
@@ -388,7 +388,7 @@ end.
388388
5. **Ask for help** - community forums and Discord
389389

390390
### Debugging Tips
391-
```pascal
391+
```objectpascal
392392
{ Add debug output }
393393
writeln('Debug: Variable x = ', x);
394394
writeln('Debug: Entering function Calculate');

0 commit comments

Comments
 (0)