Free Pascal Program Tutorial 18 - Arrays - Lazarus

preview_player
Показать описание

Arrays hold lists of variables of the same data type. When there are large lists of variables and data, it is easier to contain the data in an array than have large amounts of separate variables to hold the data. Think of an array as a placeholder for piece of data.

The syntax of the array is:

Name_Of_Array : array[range] of datatype;

For example if we wanted to create an array that will hold five human first names the syntax will look like this:

FirstName : array[1..5] of string;
Рекомендации по теме
Комментарии
Автор

Thanks so much man I learnt more in this video than I did though my entire lecture on arrays. Thanks for helping me pass.

joashjmd
Автор

I don't even speak english but I learn more from your tutorials than i do from my professor lol

ziskador
Автор

when i write in names:array [1..5] of string = ('x', 'etc..'); it says " Fatal :Syntax error , ; expected but = found " ..

DelSembro
Автор

Very usefull and very clear, I understand it very well now thank you :-)!

Soulfyres
Автор

hello, i have an question
howif i do not know the array size and the user who enter the size
whas the right instruction ?

ARABICCENTURY
Автор

how to put a value from a cell block TEdit ( 80 cells ) into the array ??

tainguyen-vopv
Автор

How do you get the procedure to show at the end? I have put in the same code as you, just doesn't show at end.. and thank you for this video. I was completely lost with this (Y)

IdentityTheftConflik
Автор

Hey i still dont understand the x part like how u did
writeln(names[x])
so u print what ever is in names but [x] what happens their i dont understand

JosiahFrancisJohnnyTheNInja
Автор

How do I write one that will accept the input of 4 names by the user and display what the user entered?

KellyChristian
Автор

In pascal's array there is no zero index? Is it start with 1 index?

michaelmarino
Автор

Is there any difference between turbo pascal, Lazarus IDE and dev-pascal?
in turbo pascal i got an error in array initialzation..


ARR : ARRAY[1..5] OF STRING = ('1', '2', '3', '4', '5');


is there any error??

muhammadtuaharaees
Автор

can you help me with using arrays for a quadratic solver program?

Kyle_da_athlete
Автор

Hey Lazarus,
Thank you for your tutorial on Arrays, however Arrays starts on 0 not 1.

SantiagoHaddad
Автор

can it be like i ask for number 3 and it display the number 3 name like jiff

moumend
Автор

What is The name of The programme you are working with please

Justarandomguyonyoutube
Автор

what does this mean,
 Error: Incompatible types: got "Extended" expected "Array[1..10] Of LongInt"

yalitsatc
Автор

Can you explain the procedure to quit please I want to add it to my program

joashjmd
Автор

well I understand but when I watch my project and the problem I feel like just giving up

Harcorextreme
Автор

could you do a tutorial on pointers? pretty please?

replacementtechnique
Автор

what pascal programming software did you use?

TheEpiphany
welcome to shbcf.ru