flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3 |
Add block-comments into Fasm? | |||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||
Total Votes : 66 |
Author |
|
THEWizardGenius 18 Mar 2005, 16:44
I think we should have block comments, but they should not at all interfere with current features, or make the language less intuitive or easy to use. If we used, for example, this as ablock comment starter:
;_ then any existing comments that use that would cause problems. If, however, we use a new symbol or group of symbols, it would be fine. If we DID use ";_" then at least make it easy to change any existing comments so they work - maybe by making it so if a "_" is at the end of the line it will end the comment. |
|||
![]() |
|
Octavio 18 Mar 2005, 17:56
For block comments i like the sintax used in Rosasm it uses ';;' at the begining of the line to signal comment start-end, this has the advantage
that is very fast to skip comments and easy to implement. |
|||
![]() |
|
UCM 08 Apr 2005, 01:24
Well, you could use this:
Code: bcomment fix macro CommentBlock { ecomment fix } bcomment Blah Blah Blah This stuff is all blahness Commentation ecomment The only drawback is that you cannot have } in the comment. _________________ This calls for... Ultra CRUNCHY Man! Ta da!! *crunch* |
|||
![]() |
|
MCD 08 Apr 2005, 06:20
UCM wrote:
Seems to be a good approach. I'm just wondering it didn't fell into my mind earlier ![]() |
|||
![]() |
|
Octavio 08 Apr 2005, 17:12
UCM wrote: Well, you could use this: can you have reserved words like 'reverse' on the comment? |
|||
![]() |
|
UCM 08 Apr 2005, 21:27
Octavio, it doesn't matter, because the block is never (or at least shouldn't be) processed, except at definition. I've tested this, and it's fine. The only character that I can think of that you can't have is }.
|
|||
![]() |
|
r22 08 Apr 2005, 23:37
I have a few "comments"
-The only reason for block commenting in ASM is to comment out a procedure while you test changes to it. -Implementing block commenting so you can add more documentation is foolish, just use a readme file. -No one is going to use a macro for block commenting that's just silly IMO -IDE's are supposed to make life easier so I suggest FASMW add a scratchpad/clipboard feature so you can highlight a chunk of code and hit a Hot Key and be able to view it while your writing 'say' a more optimized version. This would be very helpful while imrpoving algorithms as having the original to look at while improving it without having to worry about commenting one line out and another line in. |
|||
![]() |
|
Octavio 08 Apr 2005, 23:40
UCM wrote: Octavio, it doesn't matter, because the block is never (or at least shouldn't be) processed, except at definition. I've tested this, and it's fine. The only character that I can think of that you can't have is }. i have done a few tests and it seems that 'fix' is processed and also symbols defined with it, so it works fine if you use with care. |
|||
![]() |
|
UCM 08 Apr 2005, 23:45
r22:
This isn't macro... its 'fix' lol hehe Octavio: Good point, 'fix' is higher priority than 'macro', so 'fix' will be preprocessed. I haven't tested all of the reserved words though. EDIT: How did you get symbols defined with 'fix' in the macro? I tried and it didn't work. _________________ This calls for... Ultra CRUNCHY Man! Ta da!! *crunch* |
|||
![]() |
|
Octavio 09 Apr 2005, 14:02
UCM wrote: r22: 'ecoment' is processed isn't it? usually this is not a problem ,the symbol is expanded and ignored unless you do something like this: fix will } bcoment this will result in a error ecoment |
|||
![]() |
|
UCM 09 Apr 2005, 17:01
Octavio, I don't understand what you mean.
I just thought of a way to illustrate that } is not allowed inside comment for new users: Code: comment fix macro CommentBlock comment { Blah Blah Blah Funnyish commenting } EDIT: I understand now what you mean Octavio, that symbols defined earlier before comment block will be processed. So you can't, for example, put 'endg' when using Fresh macro library on its own line inside comment. Another EDIT: I just noticed that the above syntax was mentioned earlier. Hmm, maybe I wasn't reading properly... ![]() _________________ This calls for... Ultra CRUNCHY Man! Ta da!! *crunch* |
|||
![]() |
|
PopeInnocent 13 Apr 2005, 01:28
I am in favor of having a native block-commenting feature in fasm, but I am more in favor of waiting as long as it takes for Privalov to decide if and how to implement it. Done poorly, block comments could screw up a big chunk of the fasm code out there. Done right, block comments will make my life a whole lot easier when I need to rip out hundreds of lines that I was too lazy to properly test.
![]() I read several assertions that there is no place in source code for detailed documentation. I disagree for two reasons. One, documentation is more likely to stay in sync with code if it is immediately next to the code. I have external documentation ("readme" files) in most of my big projects, and invariably those files are obsolete before the bytes hit the hard drive. The source code itself may be the ultimate documentation, but if more of you bothered to document your code, you might discover that more people use and appreciate it. If it were easier to write freeform comments (therefore, block comments), more of you might, um, comment. Two, how often have you written a dozen lines of convoluted, utterly incomprehisble code because it was the only efficient way to get something done? While it isn't common practice to apologize to your readers, the least you can do is take a few lines explaining what your code does. |
|||
![]() |
|
Pirata Derek 16 Jul 2009, 09:47
Why doesn't block comment starts with double ; and ends with the same?
EXAMPLE: ;; hola amigo como te pasa? ;; |
|||
![]() |
|
vid 16 Jul 2009, 10:12
Quote: Why doesn't block comment starts with double ; and ends with the same? Because it would break backwards compatibility terribly. |
|||
![]() |
|
r22 16 Jul 2009, 12:37
r22 wrote: I have a few "comments" Reading my own comments from 4 years ago is kind of eerie. I started reading it before noticing the submitted by name and no recollection of writing it. Block commenting will stand as the only, albeit minor, flaw in FASM v1 from the beginning. |
|||
![]() |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.