User contributions
From Free Pascal wiki
Jump to navigationJump to search- 19:58, 25 November 2007 diff hist +1 Basic Pascal Tutorial/Compilers
- 19:57, 25 November 2007 diff hist +3,123 N Basic Pascal Tutorial/Hello, World New page: Hello, World (author: Tao Yue, state: unchanged) In the short history of computer programming, one enduring tradition is that the first program in a new language is a "Hello, world" to th...
- 19:52, 25 November 2007 diff hist +1,677 N Basic Pascal Tutorial/Contents New page: ==Contents== * Introduction * History of Pascal * Pascal Compilers * Hello, world * [[Program_Struct...
- 19:47, 25 November 2007 diff hist +6,779 N Basic Pascal Tutorial/Compilers New page: Pascal Compilers (author: Tao Yue, state: unchanged) This document will explain the basics about compilers as well as provide links to well-known Pascal compilers and explain how to set u...
- 19:40, 25 November 2007 diff hist +9,757 N Basic Pascal Tutorial/History New page: History (author: Tao Yue, state: unchanged) ===Origins=== Pascal grew out of ALGOL, a programming language intended for scientific computing. Meeting in Zurich, an international committee...
- 19:39, 25 November 2007 diff hist +1,528 N Basic Pascal Tutorial/Introduction New page: Introduction (author: Tao Yue, state: unchanged) Welcome to Learn Pascal! This tutorial is a simple, yet complete, introduction to the Pascal programming language. It covers all of the sy...
- 19:32, 25 November 2007 diff hist +1,268 N Basic Pascal Tutorial New page: == Note from the Editor == I was so free to call it OPascal Tutorial, since I had to find an other file name, not to overwrite the original put there by Tom. I think Object Pascal Tutorial...
- 16:17, 21 November 2007 diff hist +1,002 N Basic Pascal Tutorial/Chapter 6/Final words New page: Final Words This concludes my informal course in Pascal. You should have a reasonable understanding of the basics of Pascal by now, though this tutorial is by no means comprehensive. Com...
- 16:11, 21 November 2007 diff hist +3,809 N Basic Pascal Tutorial/Chapter 5/Pointers New page: 5F - Pointers A pointer is a data type which holds a memory address. A pointer can be thought of as a reference to that memory address, while a variable accesses that memory address direc...
- 15:55, 21 November 2007 diff hist +3,482 N Basic Pascal Tutorial/Chapter 5/Records New page: 5E - Records A record allows you to keep related data items in one structure. If you want information about a person, you may want to know name, age, city, state, and zip. To declare a r...
- 15:45, 21 November 2007 diff hist +3,155 N Basic Pascal Tutorial/Chapter 5/Multidimensional arrays New page: Multidimensional Arrays You can have arrays in multiple dimensions: <font color="#006699"><strong>type</strong></font> datatype <font color="#000000"><strong>=</strong></font> <font ...
- 15:39, 21 November 2007 diff hist +6,068 N Basic Pascal Tutorial/Chapter 5/1-dimensional arrays New page: 5C - One-dimensional Arrays Suppose you wanted to read in 5000 integers and do something with them. How would you store the integers? You could use 5000 variables, lapsing into: aa, ab,...
- 15:26, 21 November 2007 diff hist +775 N Basic Pascal Tutorial/Chapter 5/Subranges New page: 5B - Subranges A ''subrange'' type is defined in terms of another ordinal data type. The type specification is: lowest_value .. highest_value where <tt>lowest_value < highest_value</tt>...
- 15:19, 21 November 2007 diff hist +1,650 N Basic Pascal Tutorial/Chapter 5/Enumerated types New page: 5A - Enumerated Types You can declare your own ordinal data types. You do this in the type section of your program: type datatypeidentifier = typespecification; One way to do it is by c...
- 15:11, 21 November 2007 diff hist +17,910 N Basic Pascal Tutorial/Chapter 4/Solution New page: 4Ga - Solution to Towers of Hanoi <font color="#000000"> 1:</font> <font color="#cc0000">(*</font><font color="#cc0000"> </font><font color="#cc0000">Author:</font><font color="#cc0000...
- 15:03, 21 November 2007 diff hist +3,232 N Basic Pascal Tutorial/Chapter 4/Programming Assignment New page: 4G - Programming Assignment A classic recursion problem, taught in all introductory Computer Science courses, is the Towers of Hanoi. In this problem, you have three vertical pegs. There ...
- 14:47, 21 November 2007 diff hist +2,857 N Basic Pascal Tutorial/Chapter 4/Forward Referencing New page: 4F - Forward Referencing After all these confusing topics, here's something easy. Remember that procedures/functions can only see variables and other subprograms that have already been d...
- 14:43, 21 November 2007 diff hist +2,725 N Basic Pascal Tutorial/Chapter 4/Recursion New page: 4E - Recursion ''Recursion'' is a difficult topic to grasp. However, it's very easy to apply once you understand it. The programming assignment for this chapter will involve recursion. R...
- 14:34, 21 November 2007 diff hist +4,574 N Basic Pascal Tutorial/Chapter 4/Scope New page: 4D - Scope ''Scope'' refers to where certain variables are visible. You have procedures inside procedures, variables inside procedures, and your job is to try to figure out when each vari...
- 14:24, 21 November 2007 diff hist +22 N File:Scope.gif Scope regions overview current
- 13:21, 21 November 2007 diff hist +1,962 N Basic Pascal Tutorial/Chapter 4/Functions New page: 4C - Functions Functions work the same way as procedures, but they always ''return a single value'' to the main program through its ''own name'': <font color="#006699"><strong>function</...
- 13:11, 21 November 2007 diff hist +6,212 N Basic Pascal Tutorial/Chapter 4/Parameters New page: 4B - Parameters A parameter list can be included as part of the procedure heading. The parameter list allows variable values to be transferred from the main program to the procedure. The ...
- 12:58, 21 November 2007 diff hist +2,767 N Basic Pascal Tutorial/Chapter 4/Procedures New page: 4A - Procedures A procedure is a subprogram. Subprograms help reduce the amount of redundancy in a program. Statements that are executed over and over again but not contained in a loop ar...
- 12:49, 21 November 2007 diff hist +24,125 N Basic Pascal Tutorial/Chapter 3/Solution New page: 3Ea - Solutions '''Solution to Fibonacci Sequence Problem''' <font color="#000000"> 1:</font> <font color="#cc0000">(*</font><font color="#cc0000"> </font><font color="#cc0000">Author:...
- 12:11, 21 November 2007 diff hist +738 N Basic Pascal Tutorial/Chapter 3/Programming Assignment New page: 3E - Programming Assignments '''Problem 1''' Find the first 10 numbers in the Fibonacci sequence. The Fibonacci sequence starts with two numbers: 1 1 Each subsequent number is formed b...
- 12:05, 21 November 2007 diff hist -63 Basic Pascal Tutorial/Chapter 3/REPEAT..UNTIL
- 12:04, 21 November 2007 diff hist +1,022 N Basic Pascal Tutorial/Chapter 3/REPEAT..UNTIL New page: REPEAT..UNTIL The posttest loop has the following format: <font color="#006699"><strong>repeat</strong></font> statement1<font color="#000000"><strong>;</strong></font> statement2 ...
- 11:57, 21 November 2007 diff hist +2,121 N Basic Pascal Tutorial/Chapter 3/WHILE..DO New page: 3Db - WHILE..DO The pretest loop has the following format: <font color="#006699"><strong>while</strong></font> BooleanExpression <font color="#006699"><strong>do</strong></font> state...
- 11:17, 21 November 2007 diff hist +55 Basic Pascal Tutorial/Chapter 2/Input
- 17:46, 10 November 2007 diff hist +2,609 N Basic Pascal Tutorial/Chapter 3/FOR..DO New page: 3Da - FOR..DO Looping means repeating a statement or compound statement over and over until some condition is met. There are three types of loops: * fixed repetition - only repeats a fix...
- 17:34, 10 November 2007 diff hist +3,268 N Basic Pascal Tutorial/Chapter 3/CASE New page: 3Cb - CASE Suppose you wanted to branch one way if <tt>b</tt> is <tt>1, 7, 2037,</tt> or <tt>5</tt>; and another way if otherwise. You could do it by: <font color="#006699"><strong>if</s...
- 14:43, 10 November 2007 diff hist +4,416 N Basic Pascal Tutorial/Chapter 3/IF New page: 3Ca - IF The <tt>IF</tt> statement allows you to branch based on the result of a Boolean operation. The one-way branch format is: <font color="#006699"><strong>if</strong></font> Boolean...
- 19:27, 9 November 2007 diff hist +2,151 N Basic Pascal Tutorial/Chapter 3/Boolean Expressions New page: 3B - Boolean Expressions Boolean expressions are used to compare two values and get a <tt>true-or-false</tt> answer: value1 '''relational_operator''' value2 The following relational ope...
- 19:14, 9 November 2007 diff hist +285 N Basic Pascal Tutorial/Chapter 3/Sequential control New page: 3A - Sequential Control Sequential control is simple. The computer executes each statement and goes on to the next statement until it sees an end. {|style=color-backgroud="white" cellsp...
- 19:12, 9 November 2007 diff hist +13,305 N Basic Pascal Tutorial/Chapter 2/Solution New page: 2Fa - Solution <font color="#000000"> 1:</font> <font color="#cc0000">(*</font><font color="#cc0000"> </font><font color="#cc0000">Author:</font><font color="#cc0000"> </font><font colo...
- 19:04, 9 November 2007 diff hist +760 N Basic Pascal Tutorial/Chapter 2/Programming Assignment New page: 2F - Programming Assignment Again find the sum and average of five numbers, but this time read in five integers and display the output in neat columns. Refer to the original problem spec...
- 19:02, 9 November 2007 diff hist +2 Basic Pascal Tutorial/Chapter 2/EOLN and EOF
- 18:58, 9 November 2007 diff hist +54 Basic Pascal Tutorial/Chapter 2/EOLN and EOF
- 18:54, 9 November 2007 diff hist +853 N Basic Pascal Tutorial/Chapter 2/EOLN and EOF New page: 2E - EOLN and EOF <tt>EOLN</tt> is a Boolean function that is <tt>TRUE</tt> when you have reached the end of a line in an open input file. eoln (file_variable) If you want to test to se...
- 18:50, 9 November 2007 diff hist +4,731 N Basic Pascal Tutorial/Chapter 2/Files New page: 2D - Files Reading from a file instead of the console (keyboard) can be done by: read (file_variable, argument_list); write (file_variable, argument_list); Similarly with <tt>readln</t...
- 13:09, 6 November 2007 diff hist +1,357 N Basic Pascal Tutorial/Chapter 2/Formatting output New page: 2C - Formatting Output Formatting output is quite easy. For each identifier or literal value on the argument list, use: Value : field_width The output is right-justified in a field of t...
- 13:03, 6 November 2007 diff hist +810 N Basic Pascal Tutorial/Chapter 2/Output New page: 2B - Output For writing data to the screen, there are also two statements, one of which you've seen already in last chapter's programming assignment: write (Argument_List); writeln (Arg...
- 12:57, 6 November 2007 diff hist +2,615 N Basic Pascal Tutorial/Chapter 2/Input New page: 2A - Input Input is what comes into the program. It can be from the keyboard, the mouse, a file on disk, a scanner, a joystick, etc. We will not get into mouse input in detail, because t...
- 22:46, 1 November 2007 diff hist -9 Basic Pascal Tutorial/Chapter 1/Solution
- 22:35, 1 November 2007 diff hist +9,534 N Basic Pascal Tutorial/Chapter 1/Solution New page: 1Ha - Solution Here's one way to solve the programming assignment in the previous section. <font color="#000000"> 1: </font><font color="#cc0000">(*</font><font color="#cc0000"> </font...
- 22:23, 1 November 2007 diff hist +2,952 N Basic Pascal Tutorial/Chapter 1/Programming Assignment New page: 1H - Programming Assignment Now you know how to use variables and change their value. Ready for your first programming assignment? But there's one small problem: you haven't yet learned ...
- 22:10, 1 November 2007 diff hist +143 Basic Pascal Tutorial/Chapter 1/Standard Functions
- 22:10, 1 November 2007 diff hist +4,636 N Basic Pascal Tutorial/Chapter 1/Punctuation and Indentation New page: 1G - Punctuation and Indentation Since Pascal ignores end-of-lines and spaces, punctuation is needed to tell the compiler when a statement ends. You ''must'' have a semicolon following: ...
- 22:49, 30 October 2007 diff hist +2,215 N Basic Pascal Tutorial/Chapter 1/Standard Functions New page: 1F - Standard Functions Pascal has several standard mathematical functions that you can utilize. For example, to find the value of sin of pi radians: value := sin (3.1415926535897932); ...
- 19:58, 22 October 2007 diff hist 0 N File:Userscreen.png current