Lessons
Pascal · Expert
Pascal · Expert. Ten lessons. Open-book quizzes. Lesson 1 free.
10 lessons · The Host · Lesson 1 free
Pass all ten lessons for the certificate. Sample · Claim

Lesson 1 · On the house
Class references and virtual constructors
Metaclasses (class of), virtual constructors, and building objects from a registry by name.

Lesson 2
RTTI with TypInfo
Read and write published properties by name, list them, and convert enums to strings.

Lesson 3
Threads
TThread subclasses, the cthreads unit on Unix, critical sections, and WaitFor.

Lesson 4
Raw memory
GetMem/FreeMem, pointer arithmetic, Move, FillChar, CompareByte, and alignment.

Lesson 5
Managed types and copy-on-write
How AnsiString and dynamic arrays are reference counted, when copies happen, and UniqueString.

Lesson 6
Generic routines and constraints
Generic functions, generic classes with constraints, and specialization in objfpc mode.

Lesson 7
Calling C libraries
Declare external functions with cdecl, use ctypes, link libc and libm, and pass PChar buffers.

Lesson 8
Conditional compilation
$DEFINE, $IFDEF, $IF expressions, platform symbols, include files, and compile-time info.

Lesson 9
Range and overflow checks
Turn on {$R+} and {$Q+}, catch ERangeError and EIntOverflow, and scope checks locally.

Lesson 10
Bit manipulation and packed layouts
shl/shr, and/or/xor masks, sets as bit fields, bitpacked records, and SizeOf.
Sample certificate
Certificate of completion
Sign in to claim your certificate of completion.
Certificate
Finish all ten lessons, then sign in
Pass every lesson on this device (quizzes and checks). Then sign in or create an account to type your name and download the JPG.