Fireship · @fireship

Pascal in 100 Seconds

Uploaded January 4, 2024 · Length 2:43

Pascal in 100 Seconds

Summary

A 2-minute introduction to Pascal programming language, its history, and basic syntax.

  • pascal programming
  • procedural language
  • pascal syntax
  • pascal tutorial

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    Pascal a procedural highlevel

  2. 0:02

    programming language famous for teaching

  3. 0:04

    a generation of kids from the 70s and '

  4. 0:06

    80s how to code it was created by

  5. 0:07

    Nicholas worth in the late 1960s and

  6. 0:10

    named after French mathematician blae

  7. 0:12

    Pascal it was originally based on the

  8. 0:13

    alol 60 language but expanded its data

  9. 0:16

    structuring abilities allowing

  10. 0:17

    developers to build Dynamic recursive

  11. 0:19

    data structures like trees and graphs it

  12. 0:21

    got its big break when it became the

  13. 0:22

    language of choice on the Apple 2 then

  14. 0:24

    Lisa and the Macintosh and eventually

  15. 0:26

    became the default highle language on

  16. 0:28

    nearly every PC over the years it

  17. 0:30

    evolved into a variety of other dialects

  18. 0:32

    most famously turbo Pascal brought to

  19. 0:34

    you by CP Creator Anders hilburg it was

  20. 0:37

    one of the first languages with its own

  21. 0:38

    full screen IDE and in 1983 you could

  22. 0:41

    buy a copy at Circuit City for only

  23. 0:43

    $49.99 which believe it or not was a

  24. 0:45

    great deal it was used extensively in

  25. 0:47

    education to teach people how to code

  26. 0:49

    but also used to build serious desktop

  27. 0:51

    applications and games such as crisis

  28. 0:53

    Mountain gravity Wars and IBM's alleycat

  29. 0:56

    in modern times its popularity has

  30. 0:58

    declined but Pascal dial like Deli are

  31. 1:01

    still in use today and you might find

  32. 1:02

    its syntax surprisingly familiar to get

  33. 1:04

    started install a compiler like the free

  34. 1:06

    Pascal compiler then create a file

  35. 1:08

    ending in. pasas as an alternative you

  36. 1:11

    might use a dedicated IDE like Lazarus

  37. 1:13

    first we use the program keyword to

  38. 1:15

    define the main entry point for the app

  39. 1:16

    then we add the begin and end keyword

  40. 1:18

    with a period which will execute the

  41. 1:20

    actual code in the program this is like

  42. 1:22

    the main function in many other

  43. 1:23

    languages from here we can use the

  44. 1:25

    built-in right line function to say

  45. 1:27

    hello world Pascal is a procedural

  46. 1:29

    language which means in instructions are

  47. 1:30

    executed in a linear sequence one after

  48. 1:32

    the other const is used to Define

  49. 1:34

    immutable global data while VAR is used

  50. 1:36

    to define values that might change

  51. 1:38

    throughout the execution of the program

  52. 1:39

    variables are strongly typed using a

  53. 1:41

    syntax that looks almost identical to

  54. 1:43

    typescript now our main program can be

  55. 1:45

    organized into subprograms of which

  56. 1:47

    there are functions and procedures

  57. 1:49

    notice how they end with a semicolon and

  58. 1:51

    not a period indicating a subprogram at

  59. 1:53

    first glance they look identical but the

  60. 1:55

    difference is that a function returns a

  61. 1:57

    value while a procedure is only used to

  62. 1:59

    execute code or create side effects like