What is Pascal: Definition and 64 Discussions

Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named in honour of the French mathematician, philosopher and physicist Blaise Pascal.
Based on Wirth's book Algorithms + Data Structures = Programs, Pascal was developed on the pattern of the ALGOL 60 language. Wirth was involved in the process to improve the language as part of the ALGOL X efforts and proposed a version named ALGOL W. This was not accepted, and the ALGOL X process bogged down. In 1968, Wirth decided to abandon the ALGOL X process and further improve ALGOL W, releasing this as Pascal in 1970.
On top of ALGOL's scalars and arrays, Pascal enabled defining complex datatypes and building dynamic and recursive data structures such as lists, trees and graphs. Pascal has strong typing on all objects, which means that one type of data cannot be converted to or interpreted as another without explicit conversions. Unlike C (and most languages in the C-family), Pascal allows nested procedure definitions to any level of depth, and also allows most kinds of definitions and declarations inside subroutines (procedures and functions). A program is thus syntactically similar to a single procedure or function. This is similar to the block structure of ALGOL 60, but restricted from arbitrary block statements to just procedures and functions.
Pascal became very successful in the 1970s, notably on the burgeoning minicomputer market. Compilers were also available for many microcomputers as the field emerged in the late 1970s. It was widely used as a teaching language in university-level programming courses in the 1980s, and also used in production settings for writing commercial software during the same period. It was displaced by the C programming language during the late 1980s and early 1990s as UNIX-based systems became popular, and especially with the release of C++.
A derivative named Object Pascal designed for object-oriented programming was developed in 1985. This was used by Apple Computer and Borland in the late 1980s and later developed into Delphi on the Microsoft Windows platform. Extensions to the Pascal concepts led to the languages Modula-2 and Oberon.

View More On Wikipedia.org
  1. jedishrfu

    News Dr Wirth inventor of pascal has died at 89

    https://www.nytimes.com/2024/02/22/technology/niklaus-wirth-dead.html and in case the NY Times gives you some trouble: https://www.theregister.com/2024/01/04/niklaus_wirth_obituary/
  2. S

    What is the relation between Bernoulli's principle & Pascal?

    Bernoulli's principle states that under dynamic conditions total energy inside the fluid container remains constant. and if area is decreases then pressure decrease . and Pascal states that pressure = force/area . here if area decreases then pressure increase . I'm getting confusing...
  3. B

    Pressure Calculations at Points A and B using Pascal's Paradox

    Homework Statement The points of interest are at point A and B, I want to calculate the pressures at that point. I am working in gage pressure so we can ignore atmospheric pressure. Homework Equations P = pgh P = sg x specific weight of water x height The Attempt at a Solution Attempting a...
  4. E

    When is Pascal's Principle applicable?

    Homework Statement Which of the following statements about Pascal’s principle is true? A. It is valid only for incompressible fluids B. It explains why light objects float C. It explains why the pressure is greater at the bottom of a lake than at the surface D. It is valid only for objects that...
  5. B

    Are sounds louder under water?

    Given equal power at the sound source - is the amplitude (in pascals) of sound pressure waves greater in water than in air? - What is the mathematical or physical bases of any difference?
  6. doktorwho

    Help Writing a Program: Solving Encryption with Matrix and Key Sequence Method

    Homework Statement For our final test preparation we were given a few problems to write and this is one of them: I would be very grateful if you could help me find the easiest way to solve it. Homework Equations 3. The Attempt at a Solution [/B] First let me tell you my plan for writing this...
  7. doktorwho

    The order of complexity of the Pascal code -- like n * log(n)....

    Homework Statement The kind of problems i we are currently dealing with in school are like this: Find the order of complexity of the function Homework Equations 3. The Attempt at a Solution [/B] Im suppose to guess or calculate the complexity of this based on code sample. Its in Pascal and...
  8. doktorwho

    How can I analyze and understand tricky code in Pascal?

    Homework Statement This is a problem of the 10-minute test we had today in school. Its written in Pascal and it is asked of us to analyze it and figure out what is the output when it runs without writing it down. Homework Equations 3. The Attempt at a Solution [/B] I wrote it in the editor...
  9. doktorwho

    What does this pascal code do?

    Homework Statement A small list of business firms have their own registar number which is between 10000 and 30000. The first 4 digits represent the firm and the fifth digit is the control digit. The number is valid if the sum of all its digits are divisible by 7. Create a program which checks...
  10. doktorwho

    How to understand this code written in Pascal?

    Homework Statement I just started learning pascal (school curricuulum) and am finding it quite boring compared to python. After skipping a few lessons i came today and we had this code shown. I know it creates a matrix and then transposes it but am misunderstanding the details of the code and...
  11. R

    I Primality test from pascal triangle

    In pascal triangle, if all the elements of a row(except 1 in both end) are divisible by the row number, then the row number is a prime. Or if the coefficient of binomial expansion (except 1's) are divisible by the power, then the power is a prime. It is inefficient to check all the coefficient...
  12. AdamM

    Help with water pump calculations

    So i have this Diesel Water pump, i need to achive a pressure of 4 bars at the end of the hose, How to calculate the pressure in inlet to achieve the desired result of 4 bars at outlet. (Assuming that I'm using a standard hose of length 30metres, with a diameter of 2.5 inches) Pump FLOW RATE IS...
  13. T

    C/C++ Rewriting C/ C++ code in Pascal

    Hello, I have a code in C/ C++and I have just learned I am going to need it in a version compatible with Free Pascal. I would never bother anyone with it but as I need it pretty quickly and my knowledge of Pascal is very poor I would spend ages rewriting this and it probably woudn't even work at...
  14. T

    Pascal Permutation Matrix: Find Number of Columns

    Homework Statement I should write a program that determines how many columns of a given matrix are a permutation. The user will input some number N <=20 which will be the size of our matrix NxN. Then he will input the individual elements of the matrix by rows. I need to find out how many...
  15. T

    Question about sequences in Pascal

    Homework Statement I have a question about sequences in Pascal. I have been wondering if there is a way to write more than one element of succession on the output at once, without using arrays or strings. I guess best to illustrate on an example. Let's take a program that should determine...
  16. U

    The Curious Case of Pascal Barrels

    Hello! I've been confused about fluid statics, to be more specific, about the hydrostatic pressure. supposedly i have a cylindrical barrel of height h and radius of r: (a). if i were to calculate the total Force inside the barrel, do i use the (Force on the lid + Force on the Sides + Force on...
  17. T

    Pascal - absolute sum of digits

    Homework Statement Make an "absolute sum of digits" of a number in a particular numerical system. You are given two numbers (numerical system and your number N). You take the number N, add up its digits, if the result has more than one digit you add them up again and so on. You end up with...
  18. T

    Pascal - sum of digits in binary/hexadecimal

    Homework Statement Read two integers. First one tells you the type of your numeral system (binary, decimal, hexadecimal) the second one will be your number in decimal. Using functions or procedures I need to convert the number into the required system and then count the sum of its digits in...
  19. T

    Find Nice Numbers: A Program to Count Divisible Digits in Range [0,1000]

    Hello, My task is to write a program that after reading a positive integer i (from 0 to 1000) will write how many "nice numbers" are in the interval [0..i]. "Nice numbers" are numbers that are divisible by their every digit. For example 612 is a nice number becasuse it is divisible by 6,1 and 2...
  20. W

    PDF's: Binomial Formula or Pascal's Formula

    Homework Statement 50 students live in a dormitory. The parking lot has the capacity for 30 cars. If each student has a car with probability 12 (independently from other students), what is the probability that there won't be enough parking spaces for all the cars? Homework Equations P(A) =...
  21. C

    Calculate pressure from vehicle moving through air

    Alright, I've been looking everywhere, and tried to use a few formulas but they don't answer what I'm trying to find. Let's say I have a car that weighs 1815kg )4000 pounds) and its traveling at 90kph (roughly 56 mph) with a flat one square meter (10.76 sq ft.) grill facing the wind as it...
  22. P

    What really is a Pascal and a Joule?

    Hi forum, First time poster. I'm in thermo this year and it's the first time working with pascals and joules. My teacher and most post just jump right into the equations, 1Pa = 1N/m^2 and 1J = 1N * M. But what really is a pascal? I get what a N is, force to move 1kg*m/s^2. If I convert N, I get...
  23. jonny23

    Pascal Law: Pressure Increase in Symmetrical Container

    Homework Statement a water filled symetrical container has four pistons , one on each side of area A to keep water in equilibrium Now an additional force F is applied to all four pistons . then increase in pressure at the middle of container will be: Homework Equations pascal law: change is...
  24. N

    Calculating Pressure from Contact Surface

    Homework Statement The object has a mass of 10 Kg. And it has a contact surface of 25 cm^2. How much pressure do the object apply to surface? Give your answer is Pascals. Homework Equations N The Attempt at a Solution [/B] So, I think I need to divide the mass with with the surface area to...
  25. K

    Pascal grade 9 math contest question(can you ratio speed and time)

    I was given this question from the Pascal Math contest 2001: __________________________________________ Cindy leaves school at the same time every day. If she cycles at 20 km/h, she arrives home at 4:30 in the afternoon. If she cycles at 10 km/h, she arrives home at 5:15 in the afternoon. At...
  26. aditya ver.2.0

    Why doesn't our body experience equal pressure when we press our finger?

    According to Pascal Law, when there is an increase in pressure at any point in a confined fluid, there is an equal increase at every other point in the container. Then why doesn't our entire body experiences the same pressure throughout the body when we press our finger. Isn't the entire body...
  27. H

    Calculating power and energy based on frequency and amplitude (pascal)

    Hello, I'm working on a project to absorb sound energy and I'd like to ask for hints, or methods, of calculating the energy received by the microphone, or energy per second (power). I took measurements using a very sensitive microphone which outputs a voltage to a DAQ card in a PC. Using...
  28. trash

    [Pascal] Counting letters in a row without arrays

    I'm working with this excercise: make a program that gives the number of consecutive letters of a word and the most repeated letter in a row -example: if i enter aaafdseergftth and i press return the program should return a = 3, e=2, t=2 and a=3-. I've come up with a couple of "solutions"...
  29. S

    Pascal: The proverbial coin toss.

    I should preface this question by saying that I am a computer science major. A logic question was posed in an IT class as a challenge. It is extra-curricular and pertains very little to actual subject matter. The question, I assume, was a 'satirical' reference to the pascal language, or...
  30. A

    How Does Pascal's Principle Affect Fluid Dynamics and Comfort in Bedding?

    Hey all, I apologize if this question has a really obvious, basic answer, but I've done a lot of searching and haven't come across anything that explains it satisfactorily for me. So, I know that Pascal's principle underlies the workings of the hydraulic lift, and I know that while force is...
  31. L

    Pascal Principle: Calculating Acceleration & Velocity for Hydraulic Lever

    Is pascal law only true for fluids at rest? If I have a hydraulic lever and I put weight on the smaller piston, how can I calculate the acceleration and velocity at which the two pistons move to balance each other? Thanks for any help !
  32. A

    Pascal: How to use floor function in Pascal?

    Hi, I need to use floor function to write a program in Pascal, does pascal have it as a procedure/function in its library? My compiler is Turbo Pascal for windows version 1.5, so it might be outdated. Somewhere on the internet I read that if I write 'uses math;' then I could use math...
  33. S

    Sum of Pascal Array Problem Homework

    Homework Statement I need to write a program which calculates the sum of all the numbers of an array of unknown length. The input of a[i] ends when a's value is the letter 'D'. Homework Equations The Attempt at a Solution program homework; uses wincrt; var a:array[1..100] of integer; S...
  34. F

    Calculating Probability of 2 Black Balls from 3-Ball Urn w/ Pascal Triangle

    if we toss 4 coins and we want to know the probability of having 3 heads we can easily calculate that using pascal triangle . I want to know if we have an Urn that contain 3 balls : 1 black , 1 red, 1 yellow. and we want to draw 3 balls , but when we draw the first ball we put it back in the...
  35. I

    Expansion with Pascal Triangle

    Hi guys, At a real loss here. I have a question that requires me to expend (1+x+x2)5 by constructing a pattern similar to that of the "Pascal Triangle". I understand the Pascal Triangle and know how to use with with expansions of two terms only (i.e. just (1+x)5) Again, I have really have...
  36. L

    Pascal Triange - Fibonacci Sequence

    Does anyone have a DIRECT proof of the relationship between Pascal Triangle and Fibonacci Sequence? I mean not like induction or other method of proof but a direct method. I try to google it but couldn't find one
  37. Y

    Pascal Triangle diagonal numbers

    Hi folks. Since people have already discussed tetrahedral and triangular numbers from the Pascal Triangle in nuclear physics, in peer-reviewed journals, this isn't a new idea. In the electronic system one can also find these numbers instantiated. In the left-step periodic table by Charles Janet...
  38. Femme_physics

    The definition of pascal confused

    So 1 pascal is 1 Newton per squared meter Are 2 pascals 2 Newtons per squared meter, or 2 Newtons per 2 squared meter applied on the object?
  39. C

    2011 Pascal Contest Discussion

    Seeing as the test day for the 2011 Pascal Contest was yesterday, let's discuss! My answers: B>E>C>B>A A>B>D>E>C E>D>A>C>A D>A>C>E>D D>C>B>A>C Now I was not sure about problems 20,24, and 25 If anyone remembers the wording of the problems, can you please post them? In fact, can anyone...
  40. T

    Fortran Comparing Fortran and Pascal: Advantages & Uses

    Hi, I heard that fortran is quite a useful language for some scientific computations, so I looked it up to see what is looks like and I was surprised that the syntax is very similar to Pascal. I know that syntax doesn't mean anything, but it seems to me that when languages have a similar syntax...
  41. N

    Pressure and Force in Fluid Dynamics: Clarifying the Application of Pascal's Law

    Appreciate all assistance in clearing my flow of thoughts with regards to the topic on Pascal Law... Scenario : A horizontal tube (consisting of fluid) having an area of 10m2 and 1m2 on opposite side If I were to exert a force of 100N on one side of a surface of 10m2(pressure will then be...
  42. S

    Pascal: Sum Negatives & Replace in 15-Elem Array

    Homework Statement In one-range array of integers calculate the sum of all all negative values and replace these negatives with calculated sum. Length of array - 15 elements. Program must read all elements of array from keyboard. Homework Equations The Attempt at a Solution
  43. G

    Question about Pascal and pistons

    i know the usual examples of Pascal's principle (PP) and applications to pistons involves applying a force on the smaller area piston resulting in the amplified force of the large area piston. My question is kind of backwards. The numbers are a little big but just humour me... data: area of...
  44. P

    Does Computer Science include Pascal ?

    Does Computer Science include "Pascal"? Im going to major in Computer Science Engineering but someone told me that CS is all 'bout C++, Java, HTML and stuffs that I have never learned. And I am pretty sure that I am not interested in them.('cuz they look scary) However, I learned some 'bout...
  45. M

    Pascal Triangle & Its Applications.

    Hello, I have searched through out the internet but I couldn't find any information about the origin of Pascal Triangle & how it came into being... Because I am sure that such a precise & accurate numerical array didn't come out of no where ! I will be very thankful for your guidance. My...
  46. M

    F= 2721.5/0.00064516F=4 230 728 kg/m2Force of Water Jet on 1 cm²: 4.2M kg/m2

    Homework Statement What is the force on 1cm squared exerted by a water jet? Water jet does 6000 pounds of force per square inch Homework Equations F=P/A The Attempt at a Solution first convert 6000 pounds into kg 6000 pounds= 2 721.5kg and 1 square inch is 0.00064516 m2
  47. H

    Did Blaise Pascal Experiment with a Barrel?

    Hello, I would like to know if Pascal really made the experiment of the barrel. I have looked for in his treaties(traitez de liqueurs) but I have not seen any reference to the barrel. Somebody knows if Pascal speaks somewhere of the barrel? I tried to make the experiment with a tube of 10m...
  48. H

    Did Pascal Conduct the Barrel Experiment?

    Hello, I would like to know if Pascal really made the experiment of the barrel. I have looked for in his treaties(traitez de liqueurs) but I have not seen any reference to the barrel. Somebody knows if Pascal speaks somewhere of the barrel? I tried to make the experiment with a tube of 10m...
  49. A

    Pascal Converter for Generating Morse Code From Keyboard Keys

    hello evryone .. can somebody help me with a PASCAL coverter prog for converting keyboard keys to correspondig morse code values! i noe of no languages other than c and c++ .this is actually an electronic project i#m making and its based on ic 555 timer that upon clicking on keyboard keys...
  50. DaTario

    Quantum optical application of Pascal Principle

    Hello, Supose you have an U tube, in which the inner walls are made absolutelly reflective. Now, put a termical state (temperature T) for the radiation field inside the tube and close it with reflective discs which can slide without friction. Supose further that de diameter of the tube in its...