Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 413
Myanju Avatar asked May 17 '14 06:05

Myanju


Video Answer


2 Answers

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.

like image 60
Slappy Avatar answered Nov 05 '22 17:11

Slappy


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.

like image 21
MCone Avatar answered Nov 05 '22 16:11

MCone