Semper Phone


  • Improve effortlessly – just by living your life
  • Learn while waiting for your apps to load
  • Recommended by 5 universities
  • Community of over 1,000,000 learners
  • 50,000+ expert-made packs, or create your own
"One of the best learning apps" - CNET
  • Apple Play Store
  • Install Semper from the Play Store
Pascal Programming Basics

Pascal Programming Basics

Last update 

The basic functions and procedures in Pascal programming language that everyone should know!

  • image description
  • image description
    891puzzles solved

Items (27)

  • Writeln (string)

    Show the string on the screen, starting a new line

  • Readln

    Wait for user to press enter

  • Readln (string)

    String value becomes whatever was entered by user

  • Write (string)

    Show the string on the screen

  • // Comment

    A comment not part of the program, for the programmer only

  • DIV

    Integer division

  • MOD

    Remainder of division

  • If... Then

    Executes statement if condition is met

  • If... Then... Else

    Excuses statement if condition is met, else executes different statement

  • For... Do

    Executes statement a predetermined number of times

  • Repeat... Until

    Executes statement until condition is met

  • While... Do...

    Executes statement while condition is met

  • Sqr (Integer)

    Returns square of integer

  • Sqrt (Integer)

    Returns square root of integer

  • Round (Real)

    Rounds real number to nearest integer

  • Trunc (Real)

    Rounds real number down to nearest integer

  • UpperCase (string)

    Returns string in uppercase

  • LowerCase (string)

    Returns string in lowercase

  • Chr (Byte)

    Returns character for specific ASCII code, value of byte

  • Ord (Variable)

    Returns value of ASCII code for character

  • Random (Integer)

    Returns random number in range of 0 to one less than integer

  • AssignFile (FileName, extFileName)

    Assigns external file name

  • Reset (FileName)

    Opens existing file

  • Rewrite (FileName)

    Creates and opens new file

  • Read (FileName, VariableList)

    Reads file to variable list

  • Write (FileName, VariableList)

    Writes variable list to file

  • CloseFile (FileName)

    Closes the file