@@ -14,7 +14,7 @@ Comprehensive guides and references for Pascal programming.
1414
1515Pascal uses a clear, structured syntax that emphasizes readability:
1616
17- ``` pascal
17+ ``` objectpascal
1818program ExampleProgram;
1919
2020const
6363
6464** Structured Types:**
6565
66- ``` pascal
66+ ``` objectpascal
6767{ Arrays }
6868type
6969 TScores = array[1..10] of integer;
8787
8888### File Operations
8989
90- ``` pascal
90+ ``` objectpascal
9191program FileExample;
9292var
9393 inputFile, outputFile: text;
114114
115115### Dynamic Arrays
116116
117- ``` pascal
117+ ``` objectpascal
118118program DynamicArrayExample;
119119type
120120 TIntArray = array of integer;
146146
147147### Object-Oriented Programming
148148
149- ``` pascal
149+ ``` objectpascal
150150program OOPExample;
151151
152152type
@@ -214,14 +214,14 @@ end.
214214### Code Style
215215
2162161 . ** Use meaningful names:**
217- ``` pascal
217+ ``` objectpascal
218218 var
219219 studentCount: integer; // Good
220220 sc: integer; // Avoid
221221 ```
222222
2232232 . ** Consistent indentation:**
224- ``` pascal
224+ ``` objectpascal
225225 if condition then
226226 begin
227227 statement1;
230230 ```
231231
2322323 . ** Comment your code:**
233- ``` pascal
233+ ``` objectpascal
234234 { Calculate compound interest }
235235 function CompoundInterest(principal, rate: real; years: integer): real;
236236 begin
240240
241241### Error Handling
242242
243- ``` pascal
243+ ``` objectpascal
244244program ErrorHandlingExample;
245245var
246246 number, divisor: integer;
298298The System unit is automatically included and provides core functionality:
299299
300300** Memory Management:**
301- ``` pascal
301+ ``` objectpascal
302302{ Dynamic memory allocation }
303303var
304304 ptr: ^integer;
311311```
312312
313313** String Functions:**
314- ``` pascal
314+ ``` objectpascal
315315program StringFunctions;
316316var
317317 text: string;
334334
335335Provides extended system utilities:
336336
337- ``` pascal
337+ ``` objectpascal
338338uses SysUtils;
339339
340340program SysUtilsExample;
364364
365365Mathematical functions and constants:
366366
367- ``` pascal
367+ ``` objectpascal
368368uses Math;
369369
370370program MathExample;
391391
392392### Generic Programming
393393
394- ``` pascal
394+ ``` objectpascal
395395program GenericExample;
396396
397397{$mode objfpc}
462462
463463### Interface Programming
464464
465- ``` pascal
465+ ``` objectpascal
466466program InterfaceExample;
467467
468468{$mode objfpc}
551551
552552### Multi-threading
553553
554- ``` pascal
554+ ``` objectpascal
555555program ThreadExample;
556556
557557{$mode objfpc}
613613
614614### SQLite Integration
615615
616- ``` pascal
616+ ``` objectpascal
617617program DatabaseExample;
618618
619619{$mode objfpc}
684684
685685### Basic Form Application
686686
687- ``` pascal
687+ ``` objectpascal
688688unit MainForm;
689689
690690{$mode objfpc}{$H+}
738738
739739### Memory Management Tips
740740
741- ``` pascal
741+ ``` objectpascal
742742program PerformanceExample;
743743
744744type
778778
779779### Compiler Directives
780780
781- ``` pascal
781+ ``` objectpascal
782782program CompilerDirectives;
783783
784784{$mode objfpc} // Object Pascal mode
814814
815815### Unit Testing Framework
816816
817- ``` pascal
817+ ``` objectpascal
818818program TestExample;
819819
820820{$mode objfpc}
0 commit comments