Difference between revisions of "Variable"

From Lazarus wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{Variable}}
 
{{Variable}}
  
A '''variable''' is a symbol and an allocation of memory wich contains content ([[Integer|integer]] [[Char|char]] etc..) you can define. They may be in the scope of the whole program ([[Global variables|global variables]]) or a procedure, function or method only ([[Local variables|local variables]]).
+
A '''variable''' is a symbol and an allocation of memory wich contains content ([[Integer|integer]] [[Char|char]] etc..) you can define. They may be in the scope of the whole program ([[Global variables|global variables]]) or a [[Procedure|procedure]], [[Function|function]] or method only ([[Local variables|local variables]]).
 +
 
 +
== How to assign values to variables ==
 +
 
 +
The  character pair [[Becomes| :=  (becomes)]] is called assignment operator: you assign the value of what is on the right side of the := character pair to whatever is on the left side of the := character pair.
  
 
[[Category:Pascal]]
 
[[Category:Pascal]]

Revision as of 08:51, 20 April 2018

English (en) suomi (fi) français (fr) русский (ru)

A variable is a symbol and an allocation of memory wich contains content (integer char etc..) you can define. They may be in the scope of the whole program (global variables) or a procedure, function or method only (local variables).

How to assign values to variables

The character pair  := (becomes) is called assignment operator: you assign the value of what is on the right side of the := character pair to whatever is on the left side of the := character pair.