• Welcome to Valhalla Legends Archive.
 

What does this mean?

Started by ColT, July 20, 2004, 02:00 PM

Previous topic - Next topic

ColT

What does Chr(3), Chr(4), and vbCrLf mean

It was posted somewhere by Grok[vL], and I don't know what it means, the full code is:

Private Sub ws_Connect ()
 AddChat vbYellow, "Connected."
 SendData Chr(3) & Chr(4) & vbCrLf
End Sub

MyndFyre

Quote from: ColT on July 20, 2004, 02:00 PM
What does Chr(3), Chr(4), and vbCrLf mean

It was posted somewhere by Grok[vL], and I don't know what it means, the full code is:


Private Sub ws_Connect ()
 AddChat vbYellow, "Connected."
 SendData Chr(3) & Chr(4) & vbCrLf
End Sub


It means that upon the Connect event of a WinSock control named ws, you want to add the text "Connected" in yellow to the rich text box, then send a byte value of 3, a byte value of 4, and the constant carraige-return-line-feed value over the WinSock control.

Well, that's what the code means.  Chr(3), Chr(4), and vbCrLf mean a byte value of 3, a byte value of 4, and the constant carraige-return-line-feed.

If you don't know what Chr() and vbCrLf are, I suggest you learn Visual Basic.  This isn't the place.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

ColT

Well thanks I understand it a bit more, and yes I am reading a 1031 page VB book I am on page 700 somthing...

MyndFyre

Quote from: ColT on July 20, 2004, 02:53 PM
Well thanks I understand it a bit more, and yes I am reading a 1031 page VB book I am on page 700 somthing...

By page 700, if you don't know what Chr() or vbCrLf do, I'd go back to the beginning.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Zakath

Even I know what they mean, and I've never read such a book nor coded even "Hello World" in VB.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

OnlyMeat

Quote from: Zakath on July 20, 2004, 10:56 PM
Even I know what they mean, and I've never read such a book nor coded even "Hello World" in VB.

Ye but i bet you do c++ or alike which uses similar terms when formating strings i.e
printf(szBuf,"Hello world from %s\r\n",szSomeone);

where the \r\n are equivilent to control line feed.

There are alot of consts etc in vb and c++ for that matter that people who are new to programming would not automatically know so give the guy a break.

shadypalm88

Quote from: OnlyMeat on July 21, 2004, 08:38 PMThere are alot of consts etc in vb and c++ for that matter that people who are new to programming would not automatically know so give the guy a break.
I think the point is he should have a handle on the basics of VB before attempting to write a bot using it, or he should've at least known where to find the answer on his own, like in his 1031-page VB book, or even VB's object browser or VB/MSDN docs.

OnlyMeat

Damn thats a big ass book lol, msdn so much easier .
i cant believe anyone uses real books anymore i only use ebooks//msdn :)

Tuberload

Quote from: OnlyMeat on July 22, 2004, 02:48 AM
Damn thats a big ass book lol, msdn so much easier .
i cant believe anyone uses real books anymore i only use ebooks//msdn :)

I personally prefer textbooks to ebooks. Easier on my eyes, I get fewer headaches, plus I can wonder around, and sit in any position I want while reading it.  It is also easier to flip through pages. :)
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

hismajesty

Quote from: Tuberload on July 22, 2004, 02:51 AM
Quote from: OnlyMeat on July 22, 2004, 02:48 AM
Damn thats a big ass book lol, msdn so much easier .
i cant believe anyone uses real books anymore i only use ebooks//msdn :)

I personally prefer textbooks to ebooks. Easier on my eyes, I get fewer headaches, plus I can wonder around, and sit in any position I want while reading it.  It is also easier to flip through pages. :)

I agree, I have a lot of ebooks on programming but I've only used them for quick reference. They hurt my eyes to read and are harder to follow imo. I'd rather spend the money to get a real book.

tA-Kane

The best thing with ebooks is the find feature. If you try it on the right book, it's just like google.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com