[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: AFL programming style questions



PureBytes Links

Trading Reference Links

I, too, would like to have nested /* */ commenting.

As for //, they are great when commenting out only one or two lines.  However, given a large block of code, or a wordy multi-line comment, /* */ is what I want to use.

As for compatibility with other programming languages, none of the languages you mention are compatible with one another -- they are all different.  If I can program arrays in .afl, and know the difference between 'IIf' and 'if', I should have no problem transitioning to nested comments as well.

-- Keith

tuzo_wilson wrote:

--- In amibroker@xxxxxxxxxps.com, "J. Biran" <jbiran@xxx> wrote:
>
> Well, as you can tell, I am for solution 1. If afl can keep
> track of parentheses I see no reason why it cannot do the
> same for /* */.

You're right -- it can be done but I can think of a couple of reasons
why it shouldn't be done.

Standards: AFL's C style (/* */) comment behavior is standard
throughout many programming languages (C, C++, C# Java). In most
languages, C++ style comments (//) are preferred over the older C
style comments.

Logical: When text is commented out (i.e. placed between "/*" and
"*/") it makes sense that the parser ignore any characters until the
matching end comment is found. I, for one, don't want to be editing
the syntax of comments to match up "/*" & "*/".

With that said, the potential to nest comments during debugging is a
pain and that is why C++ style (//) comments are usually preferred.

I think that a comment/uncomment option within the AFL editor would be
a nice to have.

Lastly, what exactly is the performance penalty for C++ style comments
in AFL (as opposed to C style comments)?

Tuzo

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___