Inc and Dec

From Lazarus wiki
Revision as of 14:16, 26 May 2018 by Kai Burghardt (talk | contribs) (Kai Burghardt moved page Inc to Inc and Dec: merge: deduplicate page contents)
Jump to navigationJump to search

English (en)


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.