Myanju
Myanju

Reputation: 1135

How to comment a block of statements in Inno Setup?

I am using Inno Setup 5 (Unicode).

How can a block of statements be commented/uncommented using keyboard shortcut keys?

Upvotes: 13

Views: 9565

Answers (2)

Slappy
Slappy

Reputation: 5472

To comment blocks of code (under the [Code] section) use:

  • { commented code } or
  • (* this is comment *)

The Inno Setup Compiler IDE does not support shortcut keys for inserting comments.

Upvotes: 15

MCone
MCone

Reputation: 121

The correct comment character is a semicolon - like this:

; This is a note

You can use other methods - however, they will show as underlined in red. But a semicolon with nothing to the left of it (except white space) will turn the line green.

So if you have a line like this:

Source: distrib_v2.9\vcredist_x86.exe; DestDir: {sys}; Flags: ignoreversion 32bit;

and you put a semicolon in front of that line like this:

;Source: distrib_v2.9\vcredist_x86.exe; DestDir: {sys}; Flags: ignoreversion 32bit;

Then the entire line turns green as a comment.

There is no shortcut key that I know of. Since it is only one character, I don't think a shortcut key is needed.

Note that the left and right curly brackets {} are used for constants in Inno Setup. I do not recommend that you use them for comments. An example is {app} or {sys}. These are not treated as comments.

Upvotes: 10

Related Questions