Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QBasic syntax highlighted code
#11
I've just made it optional. If you want your code to be highlighted, you do this:

Code:
QBASIC:

[your code. Can start right after the QBASIC:]

Keywords in strings are no longer upper-cased, and metas have their own colour. I'm going to switch to smartdark and change the colours so it'll look good for you guys Smile
Reply
#12
Well, good that it's optional. Dem new-age stuffs ain't not no cuttin' it fo me. Tongue
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#13
Some more testers...

Code:
QBASIC' This is a comment, blah blah blah...
'
'$include: 'foo.bi'
'$dynamic

input "What is your name?", nme$
if ( nme$ = "Oracle" ) THEN
  PRINT "Hi oracle!"   ' Wassup!! do loop ya ya
elseif TRUE then
  print "Hmmm..."
else
  end
end if
Reply
#14
There, is that better?

I've changed the colours, and thrown out the old preg_replac style algo for the one I originally thought of, a finite state machine. I've added all the key words down to the letter "I".

Please try to break it! Try some obfuscated code out on it, post random snippets of code just for the fun of it etc. In fact, if you'd like, you can post spam in this thread, if you also post a decent effort at code as well Big Grin

Remember: at the moment, to make code get syntax highlighted, you have to put "QBASIC:" (without the quotes) just after the [code] tag, as posted above.

I'm guessing the colours are still shocking, but I've looked at them in smartDark and at least for now they are readable. Suggest ideas for colour as you like Smile

I'll be on tomorrow to fix any problems you guys find.
Reply
#15
Code:
QBASIC:
DIM uqlue AS STRING * 7
' = the ultimate question of life, the universe, and everything
DIM mlue AS INTEGER
' = the meaning of life the universe and everything

uqlue = "6 * 7 ="
mlue = 6 * 7


PRINT "Hello World"
PRINT uqlue
PRINT mlue

This is SO nice! Big Grin
/post]
Reply
#16
In the skin I have set up (one that is white, blue and orangishyellow) I can't read the highlighted text: it is so clear that it is unreadable. :-?
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#17
yep... the IF, END IF, END and ELSE statements are unreadable on SubOracle
Reply
#18
Why don't you make it to where when you use QB Syntax, the code-box background becomes blue, and the text colors are different shades of QB's.

*stoned to death*
Reply
#19
I'm having the END IF aso things turn out white.. on white background.... I'm using subSilver
Reply
#20
unless you change the code box background color for all, you will fix the style for one, and screw it for others.

But I don't care about anyone but us smart darkers...so I'm fine with it. :bounce:
url=http://fileanchor.com]FileAnchor[/url] - ImageAnchor - FBTK - QbasicNews - VPlanet - Various
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)