Comparesion between C, Pascal, BASIC

   C                   Pascal              BASIC

= := =

== = =

*,/ *,/ *,/

/,% div, mod DIV, MOD

printf (".."); writeln ('..'); PRINT ".."
write ('..');

scanf ("..",a); readln (a); INPUT a
read (a);

for (x = ..;...;) for x := ...to FOR x = ...
{ begin

} end; NEXT x

while (..) while ...do N/A
{ begin
} end;

do N/A N/A
{
}
while (..);

N/A repeat REPEAT
until (..) UNTIL ..

if (..) ..; if ... then ... IF .. THEN..
else ...; else ....; ELSE

switch (..) case .. of N/A
{
case :
} end;

/* .... */ { ..... } REM .....

* ^ ? ! $

struct record N/A

union N/A N/A

No comments:

Post a Comment