Free Pascal Tutorial 9 - Arrays - Lazarus

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
13,425
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 11, 2009

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;

All code can be downloaded for free at http://www.schoolfreeware.com

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (15)

Sign In or Sign Up now to post a comment!
  • Thank you Lazurus

  • Thanks so much, you explained it so much better than my teacher! They should just have you put on the projector in class :p

  • you are a better teacher than my teacher at school :P

  • Very good, bro, very good!

  • is there a video on parellel arrays?

  • awesome ! thx !

  • very useful & inspirational!!! i LOVE it!!

  • Thanks man! Awesome tutorial. Is there any way to initialize an array without using assignments? I want to define an array much like this:

    p: array[0..39] of byte = {1, 1, 1, 0, 0, 1, 0.. } etc.

    Basically I want to have a psuedo 2D array for a graphic in my program. It's stored as one dimensional, but gets parsed with for loops.

  • these videos are so helpful, thank you so much

  • THANKS ALOOOTTT!!!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more