Const LINE_FEED = Chr(10) 
Author Message
 Const LINE_FEED = Chr(10)

I'd like to declare a constant that holds the line feed character.

Something like:

Const LINE_FEED = Chr(10)

I know this can't be done because it uses a function call.  In other
languages, I can do something like:

Const LINE_FEED = $0A

to achieve the same result.  Is there any equivalent in VB?

Eric Wilson



Fri, 03 Aug 2001 03:00:00 GMT  
 Const LINE_FEED = Chr(10)
On Mon, 15 Feb 1999 20:28:38 -0500, "Eric Wilson"

Quote:

>I'd like to declare a constant that holds the line feed character.

>Something like:

>Const LINE_FEED = Chr(10)

>I know this can't be done because it uses a function call.  In other
>languages, I can do something like:

>Const LINE_FEED = $0A

>to achieve the same result.  Is there any equivalent in VB?

You could always just use the built in constant for line feed,
vbNewLine.

Zak  



Sat, 04 Aug 2001 03:00:00 GMT  
 Const LINE_FEED = Chr(10)

Quote:

>You could always just use the built in constant for line feed,
>vbNewLine.

This is incorrect. The built-in constant vbNewLine produces CR & LF together
on a PC platform.

Bertie



Sat, 04 Aug 2001 03:00:00 GMT  
 Const LINE_FEED = Chr(10)
Correct.  I only need the line feed constant.  But even if I needed CR & LF,
is there a way to do that?  Since there is a vbNewLine constant, there must
be, but is it do-able in VB, or is it only bound into the VB environment,
because the authors wrote the built-in constants in whatever language VB is
written in--C or C++, I imagine?

Eric Wilson

Quote:


>>You could always just use the built in constant for line feed,
>>vbNewLine.

>This is incorrect. The built-in constant vbNewLine produces CR & LF
together
>on a PC platform.

>Bertie



Sat, 04 Aug 2001 03:00:00 GMT  
 Const LINE_FEED = Chr(10)
The constant vbLf is Chr(10).

Peter Mundy


Quote:
>Correct.  I only need the line feed constant.  But even if I needed CR &
LF,
>is there a way to do that?  Since there is a vbNewLine constant, there must
>be, but is it do-able in VB, or is it only bound into the VB environment,
>because the authors wrote the built-in constants in whatever language VB is
>written in--C or C++, I imagine?

>Eric Wilson



>>>You could always just use the built in constant for line feed,
>>>vbNewLine.

>>This is incorrect. The built-in constant vbNewLine produces CR & LF
>together
>>on a PC platform.

>>Bertie



Sat, 04 Aug 2001 03:00:00 GMT  
 Const LINE_FEED = Chr(10)
On Tue, 16 Feb 1999 09:52:19 -0500, "Peter Mundy"

Quote:

>The constant vbLf is Chr(10).

>Peter Mundy



>>Correct.  I only need the line feed constant.  But even if I needed CR &
>LF,



>>>>You could always just use the built in constant for line feed,
>>>>vbNewLine.

>>>This is incorrect. The built-in constant vbNewLine produces CR & LF
>>together
>>>on a PC platform.

Ooops, sorry.  vbLf = Line feed, vbCrLf = carriage return + line feed.

Zak  



Sat, 04 Aug 2001 03:00:00 GMT  
 Const LINE_FEED = Chr(10)
There already is a line feed constant in VB.

Look at the vbCr, vbLf, vbCrLf and vbNewLine constants.

HTH,
Bodi

--
Remove NOSPAM to reply

Quote:
>I'd like to declare a constant that holds the line feed character.

>Something like:

>Const LINE_FEED = Chr(10)

>I know this can't be done because it uses a function call.  In other
>languages, I can do something like:

>Const LINE_FEED = $0A

>to achieve the same result.  Is there any equivalent in VB?

>Eric Wilson



Sat, 04 Aug 2001 03:00:00 GMT  
 Const LINE_FEED = Chr(10)
Thanks to everyone for the help.

Now that I know what to look for, I tried to find a chart in the VB 5.0 help
file listing all these constants, but I still haven't been able to find one.
That's why we have newgroups, I guess. :-)

Eric Wilson

Quote:

>There already is a line feed constant in VB.

>Look at the vbCr, vbLf, vbCrLf and vbNewLine constants.

>HTH,
>Bodi



Sun, 05 Aug 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. chr(10) and chr(13) in memofield gives |

2. Chr(10) & Chr(13)

3. Chr(10) and Chr(13) doesn't work

4. INPUT OR READ TO STRIP CHR(10) AND CHR(13)

5. What is chr$(13) + chr$(10)

6. vbCRLF = chr(13) + chr(10)

7. Global Const CR = chr$(13) + chr$(10) uh oh!?

8. Chr (10)

9. Why is Chr(10) not recognized?

10. Chr(10) not working?

11. Chr(10) in Text Boxes

12. Can not pass a email from Eudora via command$, chr(10) problem

 

 
Powered by phpBB® Forum Software