BigJohn
16th April 2004, 07:58
Hi,
How do we comment out multiple lines without "|" each line individually.
Something like
// fdfdfdfdf
ddfdf
dfdfd
dfdf
//

Thanks.

learner
16th April 2004, 12:54
Hi,

I believe that u r talking about commenting multiple lines in program script / report script. I use Wscite editor which has a feature to do that same. Shortcut key is ctrl + q

Regards

Learner

günther
16th April 2004, 15:21
#if 0
any code inside this block cannot be seen
by the compiler; so it's like a comment.
#endif

BigJohn
16th April 2004, 20:44
But shouldn't there be something in the Baan Tools syntax.

skosana
17th April 2004, 15:41
There should be some editor command which prefixes each line with a '|'.

I think using
//
code ...
//
will not work with the Baan compiler.

If I am in the process of developing a program and I need to comment a block of code I do something like 'günther' suggested. My program would look like...
If 1 = 2 then
code...
endif.

günther
19th April 2004, 08:28
The help page on the preprocessor contains some informations.

The principle of the preprocessor is text replacement at compile time. You often see #include, which tells the preprocessor to open the names file and to insert it into the data stream the compiler sees.
In baan the other features to #define some replacements and to conditionally replace the code (#if, #ifdef, #ifndef) at compile time are not that common as in other programming languages such as C. But you sometimes see something like #if TRITON or #if ERP.


#ifndef VERSION
#define VERSION 1 | e.g. your latest version
#endif

#if VERSION = 0
<your own bubble sort implementation>
#else
<your own quick sort implementation>
#endif

pedromrs
19th April 2004, 19:30
Hi,

Use UltraEdit or similar editor. You can use the "column mode" to comment multiple lines at the same time.

günther
20th April 2004, 08:25
Just to let you know: I also know an editor.

Go to the first line you want to comment out and mark it, e.g. [ESC] m a.
Go to the last line you want to comment out and mark it, e.g. [ESC] m b.
Now tell the editor to do a special replacement between the two marks, here: [ESC] ' a, ' b s /^/|/ -- substitute the beginning of the line by a pipe.

So, what about Notepad, Wordpad and all the other nice windows text programs? What about real editors like emacs?