Variable Declarations
In most languages, variables and their types must be declared before being used. In Scheme, local variables should always be declared in a let or let* surrounding the code that uses them.
In Pascal, variables are declared using a var declaration: var var : type ; In C++ and Java, the type precedes the variable name: type var ;
Scheme: | (let ((x 0.0) (y 0.0) (i 0) (c #\a)) ...) |
Pascal: | var x, y: real; i:integer; c:char; |
C++: | float x, y; int i; char c; |
Java: | double x, y; long i; char c; |
Contents    Page-10    Prev    Next    Page+10    Index