How to work with newlines and tabs when printing

AndyDev
04-15-2003, 04:58 AM
Hey all, I'm posting just to show you a example of something I'm almost sure you haven't seen it in VB (maybe some of u did, but most of us haven't)
Read this line:
Print "Hello";
Hey! that line looks like a C line! and this is a Vb forum!
Well, no, that it's a VB line, I'm sure you all know that Print puts a Carriege return at the end of it, well with ; it doesnt...
try this:
Print "Hello"
Print "World"
That will print "Hello" in one line and "World" in the other
Now try this:
Print "Hello";
Print "World"
That will print "Hello World" all in one line ;)

Another think you can do is this:
Print "Hello","World"
That will put a TAB between the two words...

I know there are many ways to do that, but this is just to show this feature, you can think of many usefull ways to use it. The TAB part also lets you have everything lined up correctly :cool:
For example, try running this: (10x IRBMe)
Print "heading1", "heading2", "heading3"
Print "------------", "------------", "------------"
Print "item1", "item2", "item3"
Print "item4", "item5", "item6"
All lined up nicely

Hope this added something to the people who didnt used this before :D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum