Jump to content

Pascal Programming/Cheatsheet

From Wikibooks, open books for an open world

Syntax cheat sheet

[edit | edit source]
  • monospaced denotes keywords and syntax
  • [ ] denotes optional syntax
  • | denotes multiple possible syntaxes
  • ( ) denotes grouped syntax

Statements

[edit | edit source]
syntax definition availability
if condition then begin statement(s) end;

if condition then statement;

Conditional statement standard
while condition do begin statement(s) end;

while condition do statement;

while loop standard
repeat statement(s) until condition; repeat loop standard
with variable do begin statement(s) end;

with variable do statement;

Eases the use of a variable or pointer variable of a structured type by omitting the dot notation for the variable. standard