Inc and Dec

From Free Pascal wiki
Revision as of 07:47, 25 August 2015 by Djzepi (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.