| Element |
în Pascal |
în C |
| declarare variabile |
var nume_var : tip ; |
tip nume_var ; |
| |
integer |
int |
| tipuri |
real |
double sau float |
| fundamentale |
boolean |
nu exista, se foloseste 0 si 1 |
| |
string |
se folosesc tablouri (char[]) sau pointeri (char *) |
| tipul tablou |
array[min..max] of tip |
tip[lung_tablou] |
| alte tipuri |
record |
struct sau union |
| |
set of |
nu exista |
| |
while conditie do |
while (conditie) |
| sintaxa unor |
if conditie then |
if (conditie) |
| instructiuni |
for v:= min to max do |
for (v=min;
v max; v++) |
| |
case |
switch |
| |
:= |
= |
| |
= |
== |
| operatori |
 |
!= |
| |
AND OR NOT |
&& ! |
| |
modulo |
% |
| subprograme |
functii si proceduri |
doar functii |
| operatii de I/O |
instructiuni: readln, writeln, ... |
functii de
biblioteca: printf, scanf, ... |
| delimitatori de bloc |
begin ...end |
{ ...} |
| comentarii |
{ ...} |
/* ...*/ |
|