HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

Free Pascal Program Tutorial 3 - Variables and Data Types - Lazarus

135,625 views October 29, 2012 7:21

Watch on YouTube
ChannelSchoolFreeware

Description from the creator

schoolfreeware.com

The Free Pascal Compiler and Lazarus can be downloaded at no cost at www.freepascal.org. Free Pascal and Lazarus are a Turbo Pascal / Delphi clone that can make programs for Windows, Macintosh (Mac OS X), and Linux.

This tutorial will cover data types. The data types that are most common are the integer, real (floating point), string, char, and boolean. There are several other data types that are built into Free Pascal. The list is found in the documentation on Free Pascal's Website www.freepascal.org.

The common data types that should be known are:

Integer  - It is a whole number. Its range varies by system. For example in Windows XP the integer's range is -2147483648 to 2147483647.

Real  - Real is a floating point number. Its range varies by system. For example in Windows XP, real's range 5.0E - 324 to 1.7E 308.

String - String is text.

Char - Char is a single text character by the computer. For example: a, B, &, @, l, and 4.

Boolean - A boolean variable is either TRUE or FALSE


To create a variable, place the word var between the uses section and begin (program section). The syntax for variable include:

name_of_variable:data_type;

Example:

var
  name:string;
  num1:integer;
  num2:integer;
  total:real;

About this tutorial

SchoolFreeware published this 7:21 video tutorial on October 29, 2012. It has been watched 135,625 times on YouTube.

Duration
7:21
Published
October 29, 2012
Views
135,625
Likes
939

Share

This tutorial in other languages