Page 1 of 1

Do you like the new syntax highlighting?

PostPosted: Mon Oct 18, 2004 6:51 pm
by Guest
Let us know what you think about the syntax highlighting that shows in your posts. If you want, post replies with explanations below.

PostPosted: Mon Oct 18, 2004 9:55 pm
by Guest
For those who aren't sure what syntax highlighting is. consider the following example.

Say I want to tell "Johnny" how to assign the value of "sample" to the variable data. I would tell him to use the following line of code:

Setvar "[data]" "sample"

In this case, I only typed the text, the commands/vars were auto-colored by the board just as Neobook does.

PostPosted: Tue Oct 19, 2004 6:16 am
by Guest
I like the syntax highlighting very much!

Testing:

Code: Select all
If "[variable]" "=" "[compound[variable]]+constant"
    GoSub "SubroutineName"
Else
    AlertBox "[PubTitle]" "[PubAuthor] wrote some bad code here."
Endif

Testing:

If "[variable]" "=" "[compound[variable]]+constant"
   GoSub "SubroutineName"
   SetVar "[magoo" "deliberate error here]"
Else
   AlertBox "[PubTitle]" "[PubAuthor] wrote some bad code here."
   SetVar "[magoo]" "[compound[variable]" .. unbalanced brackets
Endif

Note: The line with the "deliberate error]" highlights the same way in NeoBook's own editor, as does the line with unbalanced brackets.

Hmmm...!

There appears to be a difference in how highlighting is handled in code sections, and the leading spaces in the GoSub and AlertBox lines in the second test did not appear. Also, highlighting seems to work differently when previewing a post than after submitting a post.

Testing 2004-10-20:

Code: Select all
If "[something]" "=" "[something.else]"
    Gosub "I am thrilled"
Else
    Gosub "I am still thrilled"
EndIf


If "[something]" "=" "[something.else]"
   Gosub "I am thrilled"
Else
   Gosub "I am still thrilled"
EndIf

Testing:

This is a test to see if vertical bars (a.k.a., pipe characters) like this "|" appear correctly. In one post I noticed that my use of pipes was displayed as "|" (quotes not included).

Later: The pipe characters do show up, so I wonder why in my earlier post the | characters replaced the pipe. I know that | is an HTML way of representing the pipe character. I'll guess that the port from the old board to the new induced this problem.

PostPosted: Tue Oct 19, 2004 8:02 am
by Guest
You're right, Sam. There is a difference. I've never used the code feature before. This should keep Steve up another night or two. :)

NeoBook new Index und search possibileties

PostPosted: Tue Oct 19, 2004 10:30 am
by Guest
Hi Every One

I think it a quite modern face that the forum has become! I like it and NeoBook, allthough Neobook makes me sometimes crazy! But as I said, I like it.

Regards from good old Germany,

Dick :lol:

PostPosted: Tue Oct 19, 2004 6:34 pm
by Guest
This is a test of indented code:

If "[test]" "=" "true"
    GoSub "process"
endif

____________
First Problem Fixed.

So from here, how do we want to do this? Have it so the syntax is highlighted with the code BB tags, or should we just remove the code BB tags?

PostPosted: Wed Oct 20, 2004 5:59 pm
by Guest
Hi Steve,

First of all, thanks for working so hard on the new Forum and the multitude of enhancments. I really, really appreciate it. And thank's for fixing the "indentation" problem with code fragments not wrapped in [code]..[/code] tags.

So from here, how do we want to do this? Have it so the syntax is highlighted with the code BB tags, or should we just remove the code BB tags?


I'm not sure I understand your question. From my point of view, color coding NeoBook's keywords and variables is not necessary to reading code on this forum. If it is a lot of work to make this work, I'd vote against — especially since NeoBook 5 has been announced and there are likely to be some maintenance issues with the syntax checking. Also, since some of NeoBook's keywords are frequently used English words (e.g., If, While, End), they will appear highlighted in their non-NeoBook uses which could be distracting.

I plan to wrap [code]..[/code] tags around most of my code postings from now on.

PostPosted: Wed Oct 20, 2004 7:25 pm
by Guest
Agreed, I think the best way to handle it (and most logical) is to restrict the the highlighting to within the code brackets. That way it will be there when intended but not pose a problem with normal speech (I noticed it happened to Al with Delay earlier)

I wrote up a nice little Neobook pub to quicken the process of formatting the code for the php script.

Theres a few other things I have to fix first(extra pages, old posts being locked), but this is on my list.