Qbasicnews.com

Full Version: Qb Auto-Indentor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
[salesman]Have you ever posted code on a forum or sent it to a person and they said your code was sloppy? Ever tried to get help and then told that your code was not understandable?

Well you can fix that now with the ease of copy/paste. Here's what you do.

With those five steps, your code will go from looking like this:

Code:
for x = 1 to 20
if r = 2 then
x = x + 2
end if
next x

To this:

Code:
for x = 1 to 20  
   if r = 2 then
      x = x + 2
  end if
next x


Auto-Indentor created by Zap. Hosted on qbtk's hosting, but with no mention of qbtk's on the site.

Thanks
looks like something ColinWurks did years ago, only his was a VB program.
I like it!
Quote:looks like something ColinWurks did years ago, only his was a VB program.

Yeah, there used to be a qb version IIRC.
Wow! An "Aga -- The Rest of Us" translater! Someone should send him a copy.

:rotfl:
unfortunately for aga, it does not remove:

- Line numbers
- gotos
- wierd looping styles

hehe

Hey... where is aga? COME BACK AGA! dont leave us! I just realised I havent seen him in ages!
Hey cool, this gives me an idea for my new project... rrrrrrrrrsssssshhhh Wink

I see you're using a <pre> for it though. Do you want code to indent using &nbsp; instead?
Yeah, where's Agamemnus? It would be a pitty to lose one of the best coders here. He may code in the AGA WAY, but he gets the job done, and quite well. We need him back.

Sumo: Great app Smile
Don't praise me. Zap does the php stuff. He coded quickhost and this from scratch. I'm just the slavedriver.
Quote:looks like something ColinWurks did years ago, only his was a VB program.

Yeah I got the idea because someone at qbtk, not mentioning names to keep Dr_ds privacy, didn't know how to indent code properly, and then he said that there used to be a program that could that stuff. Yet none of us could remember where it had been, so I went coding it in QB, then translated it to php to share with all Big Grin

Oracle: I thought about that, but it seems more qb-stylish to use <pre>. I know it could have been done using css and stuff, but I'm in the middle of exams, so it would have to wait. I'm adding a "View Code" link later today so anyone interested can see how it's done, cuz it's really fairly easy.

And thanks everyone.
Pages: 1 2