Difference between revisions of "Inc and Dec"

From Lazarus wiki
Jump to navigationJump to search
(Created page with "{{Inc}} = Inc = Inc (increment) procedure in Pascal programming let you easily add 1 (or some other value) from, a variable. For example, using Inc (increment) procedure, y...")
 
m (Kai Burghardt moved page Inc to Inc and Dec: merge: deduplicate page contents)
(No difference)

Revision as of 14:16, 26 May 2018

English (en)

Inc

Inc (increment) procedure in Pascal programming let you easily add 1 (or some other value) from, a variable.

For example, using Inc (increment) procedure, you can increase 1 to a variable named a like this:

 inc( a );

If you want to add by two (or some other value):

 inc( a, 2 );

Inc procedure included System Unit.


See also

  • Link to RTL documentation: inc
  • Dec - decrement value of integer variable.
  • Link to RTL documentation: succ - Return next element for an ordinal type.
  • For control_variable := start_point To end_point Do statement.