Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multi-line REM ?
#11
Code:
first executed code
#rem code code code
code code
code code code

code

code code code

code
#rem code(this is also remed out!)
second executed code


Start ignoring from the first #rem, until it hits another #rem



No need for multiple new keywords cluttering...
Reply
#12
#if 0 works just fine; why invent a new keyword? Besides, a row of single quotes (') down the left side of a long comment makes it easier to pick out from actual code.
Reply
#13
Readability. A different face on it would help beginners read existing code.

Thats really my only complaint about FB's new features, with every respect of the difficulty of making consistent syntax. The new features are just difficult for beginners.

I'm in the ballpark of just using a big chunk of 's. But I can see some kid staring at a bunch of #IFDEF 0 and being dumbfounded.
Reply
#14
I know this is blasphemy but… what’s wrong with adding a few types of comments including (and here is where the stakes will start to burn) /* and */.

I am a HUGE fan of BASIC. IMHO it is the best language for what I do. I can code in C, C++, ForTran, Pascal, JAVA, IDL, etc., etc., etc. but I only use those if I have too. I LOVE BASIC!

Now having said that, I like the // and /* */ form of comments. No I’m not one who would wish to turn FB into C, I just like that style.

Why not have several comment commands? We already have two, why not 3, or 4, or 8? Or perhaps the IDE creators could add a feature that allows you to use whatever you want and then change it to a collection of apostrophes.

If you are going to add keywords, may I suggest that we keep it in a BASIC like manner? The idea of keeping the same form as TYPE and ENUM is attractive. I.e.

Code:
COMMENT
     PRINT “You won’t see this”
END COMMENT

Seems to keep the feel of BASIC yet remains structured and ‘modern’.

<opinion>REM always sucked, so why bring it back into a new light?< /opinion>

Here’s my two cents… don’t spend it all in one place.
Reply
#15
Quote:Multi line rem? just create a new rem for each line you need

Code:
'this is rem 1
'this is rem 2
'and so on
SSC,

Yours is the KISS approach, and I totally agree. Let's not clutter up the language just to put comments in the code.
*****
Reply
#16
VonGodrics IDE supports multireming and unreming rows. Tongue
Reply
#17
I know, I know but I am still learning.

Let me get this strait:

IF will be executed at runtime

#IF will be executed at compile time?

Is that right?

BTW, I LOVE the /* and */, and the // :wink:
i]"But...it was so beautifully done"[/i]
Reply
#18
v!c pliiz DON'T add comment blocks. It would need so mutch haacking in the scintilla...

Beside I added to FBIde block comment in/out and who needs
#if 0
...
#endif does the job

yes that's preprocessor stuff. Actually it's evulated even before actual compilation.

#if 0 <- equals to false so it won't touch it.
beside you can do some nice stuff like.

#define IncludeSound 0

...code...

#if IncludeSound
...sound code...
#endif
url]http://fbide.sourceforge.net/[/url]
Reply
#19
I'm with VonGodric....

as the old saying goes..

saving keystrokes is the job of the IDE, not the language :-)
hen they say it can't be done, THAT's when they call me ;-).

[Image: kaffee.gif]
[Image: mystikshadows.png]

need hosting: http://www.jc-hosting.net
All about ASCII: http://www.ascii-world.com
Reply
#20
Here is a quick multi-comment hack for if you really prefer to read 'comment' and 'endcomment' in the code:

[syntax="FB"]
#define comment #if 0
#define endcomment #endif

print "hello"
comment
this is a multi-line comment.
blah blah.
endcomment
print "world"

while inkey$ = "": wend
[/syntax]
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)