FANDOM


This article is part of the Getting Started series

Variables can be suposed to a variety of operations.


Number-variable operations
addition
a:=b+c;
subtraction
a:=b-c;
multiplication
a:=b*c;
division, with decimals
a:=b/c;
division, without decimals
a:=b div c;
modulo[1]
a:=b mod c;
square
a:=sqr(b);
square root
a:=sqrt(b);
nth power, done
manually, as no function for
this has been included in
the Borland dialect of Pascal
result:=1;
for i:=1 to n do
result:=result*a; {the n-th power of a, placed in
                   the "result" variable}
Opperations with sets
unification of sets
a:=b+c;
difference of sets
a:=b-c;
intersection of sets
a:=b*c;
Operations with strings
concatenation (unification
of two strings)
a:=b+c;

  1. Modulo is the rest (or change) of the division. For example 5 mod 2 = 1 and 4 mod 2 = 0

See alsoEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.