Alex
October 29th, 1998, 02:04 PM
Hey guys and gals... just wondering if you know how I can make a newline when printing data. I know in C/C++ it's ENDL or "\n", but how do I do this with Visual Basic?
Thanks ;)
Thanks ;)
|
Click to See Complete Forum and Search --> : I really am a newbie ;( Alex October 29th, 1998, 02:04 PM Hey guys and gals... just wondering if you know how I can make a newline when printing data. I know in C/C++ it's ENDL or "\n", but how do I do this with Visual Basic? Thanks ;) __Neph__ October 29th, 1998, 03:01 PM Hi, dim EndOfLine as string EndOfLine = chr(13) & chr(10) ' = \n 'if you want to print something like 'Hello\nWorld debug.print "Hello" & EndOfLine & "World" bye __Neph__ Alex October 29th, 1998, 03:19 PM Thanx, except that has problems in VB5... I figured it out myself just a few min ago... you gotta use the built in VB control vbcrlf peace phil November 10th, 1998, 06:41 PM hey Alex use these... Constant Equivalent Description vbCrLf Chr(13) + Chr(10) Carriage return–linefeed combination vbCr Chr(13) Carriage return character vbLf Chr(10) Linefeed character vbNewLine Chr(13) + Chr(10) or Chr(13) Platform-specific new line character; whichever is appropriate for current platform vbNullChar Chr(0) Character having value 0 vbNullString String having value 0 Not the same as a zero-length string (""); used for calling external procedures vbTab Chr(9) Tab character vbBack Chr(8) Backspace character vbFormFeed Chr(12) Not useful in Microsoft Windows vbVerticalTab Chr(11) Not useful in Microsoft Windows so put in a vbCrLf instead of chr(13) + chr(10)... VB will replace the constant at runtime (compile-time) but it makes the code MUCH more readable ! phil :) ps check out the 'constants' section under help... it will open your eyes to a lot of things you can do in VB Phil November 10th, 1998, 06:41 PM hey Alex use these... Constant Equivalent Description vbCrLf Chr(13) + Chr(10) Carriage return–linefeed combination vbCr Chr(13) Carriage return character vbLf Chr(10) Linefeed character vbNewLine Chr(13) + Chr(10) or Chr(13) Platform-specific new line character; whichever is appropriate for current platform vbNullChar Chr(0) Character having value 0 vbNullString String having value 0 Not the same as a zero-length string (""); used for calling external procedures vbTab Chr(9) Tab character vbBack Chr(8) Backspace character vbFormFeed Chr(12) Not useful in Microsoft Windows vbVerticalTab Chr(11) Not useful in Microsoft Windows so put in a vbCrLf instead of chr(13) + chr(10)... VB will replace the constant at runtime (compile-time) but it makes the code MUCH more readable ! phil :) ps check out the 'constants' section under help... it will open your eyes to a lot of things you can do in VB codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |