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
Code:
qbasicPRINT "Thi_
s is a multi_
line line in qbasi_
c"

int_
eger_
$="This is anot_
her"

PR_
Int int_
eger$
I'm evil.... :rotfl:
^^ only trouble with that is it's not exactly valid, is it? Wink. But that does point out that there's problems with the string recogniser, especially after the simple cases are done... thanks Smile
It's valid.. try loading it in QB...

It's invalid to type directly in QB..

But if you make a .bas file in notepad (or whatever) you can use _ as a line continuation... it's actualy being used quite often... especially in libraries where lines tend to become very long...


*back to highlitghting and colors*
But what about having 2-3 pictures... 1 being the top of the QB IDE, 1 being bottom (and perhaps 1 being side.. have to use it many times though...) and then have blue standard/default QB background color as the codebox background... that would be very cool.. atleast in my opinion... Tongue
You can't use the underscore with strings...this is what you'll get when you load your code in the IDE:

Code:
PRINT "Thi_"
s is a multi line line in qbasic"

integer$="This is anot_
her ""

PRINT integer$
:oops: .... sry...
Quote:*back to highlitghting and colors*
But what about having 2-3 pictures... 1 being the top of the QB IDE, 1 being bottom (and perhaps 1 being side.. have to use it many times though...) and then have blue standard/default QB background color as the codebox background... that would be very cool.. atleast in my opinion... Tongue

Opinions by others? If someone could create these pictures I'll add them, but I'm planning on releasing this as a phpBB mod for generic syntax highlighting, so the QB ide would look out of place. Call it a "mod of a mod" Wink
Quote:At the moment, it's just hard-coded in (the colours). But I'm gonna fix that ASAP.

Code:
QBASIC'3d vortex......2003
'Http://Relsoft.Ath.cx
'Here's my take on the starfield stuff...


1 IF I% = 0 THEN SCREEN 13 ELSE DIM Dist!(200), Rot!(200)
2 I% = (I% + 1) MOD 200
3 IF J% < 257 THEN J% = (J% + 1)
4 PSET (Dist!(I%) * COS(Rot!(I%) / 56.32716) + 160, Dist!(I%) * SIN(Rot!(I%) / 56.32716) + 100), 0
5 Rot!(I%) = (Rot!(I%) + .5 * (Dist!(I%) / 50)) * -(Rot!(I%) <= 360)
6 IF Dist!(I%) < 0 OR Dist!(I%) > 170 THEN Rot!(I%) = RND * 360
7 IF Dist!(I%) < 0 OR Dist!(I%) > 170 THEN Dist!(I%) = RND * 170 ELSE Dist!(I%) - (2 - (Dist!(I%) / 150))
8 IF J% > 255 THEN PSET (Dist!(I%) * COS(Rot!(I%) / 56.32716) + 160, Dist!(I%) * SIN(Rot!(I%) / 56.32716) + 100), Dist!(I%) + 50 ELSE PALETTE J%, 65536 * (J% \ 4) + 256 * (J% \ 4) + (63 - (J% \ 4))
9 IF INKEY$ = "" THEN 2

Arrrrrrrrrrrgggggggggggggg.........I am getting dizzy! :roll:
Har har Wink The latest version I'm working on colours even more of that stuff Wink. Anyway, it makes a change from just a colourless blob...
Dude make the colors a bit softer. They are very sharp :x
Like I've said before, you guys have to suggest colours to me. I personally like the colours for the light themes, maybe the colours for smartDark are bad, in which case, suggest away.

BTW, I've now done all of the keywords for QB Smile
Pages: 1 2 3 4 5 6 7 8 9