Qbasicnews.com

Full Version: QBasic syntax highlighted code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
Quote:You changed the mini pictures for Sub-Oracle!!
Now It is very hard to see what is a new post and what is old! It hurts my eyes because I have to take time to check carfully wether a topic has new posts. anyone agree with me?

Yes, I only noticed that after. This is actually now subOracle 1.1, so there's a few changes (and a few more if you use mozilla). I'm going to darken them and release 1.1.1.

Quote:Edit: And waht happened to the QBasic screen images thing?

I removed it, it was in subOracle but it looked stupid at the smallest formatting error... unfortunately it just won't work right Sad

Quote:Edit2: and the syntax="qbasic" thingy doesnt indent properly...

Yep, I know about that one. I'm working on it. But now the numbers and brackets highlight a lot better Smile
ok cool. Shame about the QBasic screen thing not working, But I guess we cant have everything on this forum! =)
The indentation problems have been solved ^_^

[syntax="qbasic"]' no spaces before
' 1 space before
' 2 " " "
' 3
'4
'5
'6[/syntax]

And now, (if you'd want to, but it'd be pretty silly...) you can do this (which you can do with [code] tags to, btw):

[syntax="qbasic"]print "Here's some QB code"
[syntax="qbasic"] ' well, that's not a keyword but in some languages it *might* be
[/syntax]
[/syntax]
Nitpick: Auto-Capitalization would be a cool little thing to add. It's just something that sparked in my head, though.
You can't see most of it!!!
Let's try it:

Code:
qbasicprint "Hello, World!
          qbasicprint "I h8 this highlighting!!!"
          qbasicinput thevar
          qbasicprint "some highlighting if you have to type qbasic in"
          qbasicprint "front of everything!!!"

:barf: :barf: :barf: :barf: :barf:
Did you two even read the instructions?????

Rockuman: You didn't even try it, did you. Try typing some code into [syntax="qbasic"] tags and see what happens!

Wizard Genius: You don't need qbasic in front of every line... you can also do it like this:

[syntax="qbasic"]
' statements
[/syntax]

Which, for example, looks like this:

[syntax="qbasic"]print "Hello, world!"

' now, for this print, I'm not going to close the string. So it even
' picks up errors in your code
print "here is a string without a closing quotemark
do
print "see what happens?
loop[/syntax]

There's not much wrong with the highlighter now, you guys just need to read the manual Wink
Quote:Did you two even read the instructions?????

Rockuman: You didn't even try it, did you. Try typing some code into [syntax="qbasic"] tags and see what happens!

[syntax="qbasic"]
print "Abra-cadabra"
[/syntax]
(1). I didn't necessarily try it myself, I just looked at what others did, and saw that nothing was capitalized, thus an 'idea' popped into my head.

(2). If they did have them, I couldn't see them because in the current style I'm using, it's pitch black...
I don't see anywhere where a qbasic keyword is lower case... they're only lower case if the user has used [code] tags.

What style are you using?
[syntax="qbasic"]
1
' I am just testing this
REM I am just testing this
print "Hello world"
print "Hello world";3
print "Hello world";x%
print "Hello world";x
print "if x=2 then goto 1"
if x=2 then goto 1
[/syntax]


...The statement(?) colors (dark blue) are more or less
unreadable in smartdark
Pages: 1 2 3 4 5 6 7 8 9