Dant.A
Dant.A

Reputation: 197

Inc function Inno Setup

This may be really simple but when I try to compile a program containing

Inc(Count);

In Inno Setup I keep getting

Unknown identifier 'Inc'

I believe this is how you increment integers in Pascal, and am confused on how to proceed here.

I am using Inno Setup 5.5.9(a).

Upvotes: 3

Views: 717

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202272

Indeed, the Inc does not work in Ansi version of Inno Setup. It works in Unicode version though.

You should not use Ansi version anyway. It's 2016, no application should use legacy encoding anymore. Switch to the Unicode version.


If you have a very good reason to stick with Ansi version (like lots of Pascal code that works with Ansi strings, which is error prone when converting to Unicode version, see Upgrading from Ansi to Unicode version of Inno Setup (any disadvantages)), you can of course use:

Count := Count + 1;

Upvotes: 2

Related Questions