Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

Pascal-projects

A collection of Pascal programming projects ranging from beginner to advanced levels

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Pascal-projects

A collection of Pascal programs from beginner to advanced, plus modular units and mini-projects.

Repository structure

pascal
Pascal-projects/
????????? beginner/       # 25 programs (basics ??? mini-projects)
????????? intermediate/   # 24 programs (arrays, records, algorithms ??? apps)
????????? advanced/       # 25 programs (algorithms, data structures ??? systems)
????????? modules/        # Reusable units with demos (~10 files per topic)

Beginner (beginner/)

# File Topic
01 01_hello_world.pas First program
02 02_variables_and_input.pas Variables & input
03 03_simple_calculator.pas Calculator
04 04_even_odd.pas Conditionals
05 05_for_loop_sum.pas For loop
06 06_while_loop_guess.pas While loop
07 07_repeat_until_menu.pas Repeat-until menu
08 08_temperature_converter.pas Temperature conversion
09 09_multiplication_table.pas Nested loops
10 10_string_basics.pas Strings
11 11_swap_two_numbers.pas Swap
12 12_largest_of_three.pas Max of three
13 13_positive_negative_zero.pas Sign check
14 14_print_1_to_n.pas Print sequence
15 15_countdown.pas Countdown
16 16_sum_of_digits.pas Digit sum
17 17_reverse_number.pas Reverse number
18 18_multiplication_single.pas Times table
19 19_ascii_codes.pas ASCII
20 20_simple_interest.pas Simple interest
21 21_number_guessing_game.pas Project: Guessing game
22 22_quiz_app.pas Project: Quiz app
23 23_unit_converter.pas Project: Unit converter
24 24_grade_calculator.pas Project: Grade calculator
25 25_rock_paper_scissors.pas Project: Rock-Paper-Scissors

Intermediate (intermediate/)

# File Topic
01 01_array_max_min.pas Array max/min
02 02_factorial_function.pas Functions
03 03_student_records.pas Records
04 04_file_read_write.pas File I/O
05 05_procedure_swap.pas Procedures / var params
06 06_linear_search.pas Linear search
07 07_counting_sort_chars.pas Character frequency
08 08_2d_array_transpose.pas Matrix transpose
09 09_unit_example.pas Simulated unit
10 10_matrix_add.pas Matrix addition
11 11_string_length_manual.pas String length
12 12_count_vowels.pas Count vowels
13 13_prime_check.pas Prime check
14 14_fibonacci_iterative.pas Fibonacci
15 15_gcd_euclidean.pas GCD
16 16_selection_sort.pas Selection sort
17 17_frequency_array.pas Frequency count
18 18_nested_records.pas Nested records
19 19_procedure_max.pas Procedure max
20 20_contact_book.pas Project: Contact book
21 21_bank_account.pas Project: Bank account
22 22_todo_list.pas Project: To-do list
23 23_library_catalog.pas Project: Library catalog
24 24_expense_tracker.pas Project: Expense tracker

Advanced (advanced/)

# File Topic
01 01_binary_search.pas Binary search
02 02_bubble_sort.pas Bubble sort
03 03_linked_list.pas Linked list
04 04_recursive_fibonacci.pas Recursive Fibonacci
05 05_matrix_multiplication.pas Matrix multiply
06 06_quicksort.pas QuickSort
07 07_stack_using_array.pas Stack
08 08_queue_using_array.pas Queue
09 09_binary_tree_traversal.pas Binary tree
10 10_gcd_lcm_euclidean.pas GCD / LCM
11 11_insertion_sort.pas Insertion sort
12 12_merge_sort.pas Merge sort
13 13_tower_of_hanoi.pas Tower of Hanoi
14 14_sieve_of_eratosthenes.pas Sieve of Eratosthenes
15 15_infix_to_postfix.pas Infix → postfix
16 16_dfs_graph.pas DFS
17 17_bfs_graph.pas BFS
18 18_knapsack_01.pas 0/1 Knapsack
19 19_longest_common_subsequence.pas LCS
20 20_sparse_matrix.pas Sparse matrix
21 21_student_management.pas Project: Student management
22 22_inventory_system.pas Project: Inventory system
23 23_text_editor_simple.pas Project: Text editor
24 24_expression_evaluator.pas Project: Expression evaluator
25 25_maze_solver.pas Project: Maze solver

Modules (modules/)

Each subfolder holds a reusable unit plus demos and helpers (~10 files each):

Folder Focus
mathutils/ Arithmetic, power, factorial, GCD, primes
stringutils/ Reverse, palindrome, trim, word count, replace
arrayutils/ Fill, sort, search, reverse
dateutils/ Leap year, validation, day-of-year, age
stackunit/ Stack ops, parentheses check, two-stacks
queueunit/ Circular queue, priority queue, deque
geometry/ Circle, rectangle, triangle, sphere, Heron
fileutils/ Write, read, copy, append
statistics/ Mean, variance, median, mode, range
conversion/ Temperature, length, weight, speed, area
complex/ Complex arithmetic, conjugate, powers of i

See modules/README.md for compilation notes on units.


How to compile and run

Free Pascal Compiler:

bash
fpc filename.pas
./filename

Modules (example):

bash
cd modules/mathutils
fpc mathutils.pas
fpc demo_mathutils.pas
./demo_mathutils

Also works with Lazarus and Delphi (most examples use standard Pascal features).


Happy coding!