Pascal in 100 Seconds

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Pascal a procedural highlevel programming language famous for teaching a generation of kids from the 70s and 80s how to code it was created by Nicholas worth in the late 1960s and named after French mathematician blae Pascal it was originally based on the alol 60 language but expanded its data structuring abilities allowing developers to build Dynamic recursive data structures like trees and graphs it got its big break when it became the language of choice on the Apple 2 then Lisa and the Macintosh and eventually became the default highlevel language on nearly every PC over the years it evolved into a variety of other dialects most famously turbo Pascal brought to you by CP Creator Anders hilburg it was one of the first languages with its own full screen IDE and in 1983 you could buy a copy at Circuit City for only $49.99 which believe it or not was a great deal it was used extensively in education to teach people how to code but also used to build serious desktop applications and games such as crisis Mountain gravity Wars and IBM's alleycat in modern times its popularity has declined but Pascal dial like Deli are still in use today and you might find its syntax surprisingly familiar to get started install a compiler like the free Pascal compiler then create a file ending in. pasas as an alternative you might use a dedicated IDE like Lazarus first we use the program keyword to define the main entry point for the app then we add the begin and end keyword with a period which will execute the actual code in the program this is like the main function in many other languages from here we can use the built-in right line function to say hello world Pascal is a procedural language which means instructions are executed in a linear sequence one after the other const is used to Define immutable global data while VAR is used to define values that might change throughout the execution of the program variables are strongly typed using a syntax that looks almost identical to typescript now our main program can be organized into subprograms of which there are functions and procedures notice how they end with a semicolon and not a period indicating a subprogram at first glance they look identical but the difference is that a function returns a value while a procedure is only used to execute code or create side effects like this isod function takes an integer as an argument then returns a Boolean value we use some conditional logic to determine that then assign the result to the function name itself which tells Pascal to return that value from the function now we can call the function from the main program and get a value back Pascal is also very good at complex data structuring like we might create a custom type for a record which is a key value pair or a dictionary in other languages from there we can assign that type to a variable then create records and access their fields with notation and now that all the code is in place we can build the executable with the compiler this has been Pascal in 100 seconds thanks for watching and I will see you in the next one
Info
Channel: Fireship
Views: 541,701
Rating: undefined out of 5
Keywords: webdev, app development, lesson, tutorial
Id: K9mzg8ueiYA
Channel Id: undefined
Length: 2min 42sec (162 seconds)
Published: Thu Jan 04 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.