• Welcome to Valhalla Legends Archive.
 

Winsock api

Started by ntaryl, March 20, 2007, 02:05 PM

Previous topic - Next topic

raylu

In many scripting languages with no way to specify variable types, often, you need:
somevar = 5
somevar += ""

to convert to a string.

Also, using "" would cause the string literal to be created and destroyed every one of those 50,000 times, wouldn't it?
Pie?

l2k-Shadow

#16
Quote from: [RealityRipple] on March 23, 2007, 11:17 PM
They can be if you use StrConv on them, but otherwise, no, they're not unicode.

Uhm.. VB6 strings are definitely stored in unicode, I've run into many problems when writing programs that use parts from different languages with VB6. But you can use this simple test too:


Sub Main()
Dim s As String
    s = "Hello"
    MsgBox LenB(s)
End Sub


Quote from: [RealityRipple] on February 05, 2007, 01:44 AM
Ok, your grammar is lacking a bit there... So I'll try to answer what I think you asked. Yes, I paid $25 for Visual Basic 6 certification. Yes, it's pretty much a worthless feature nowadays (PRETTY MUCH doesn't mean totally useless). It's still there because there are uses for it. The fact is, it's there in (i think) all BASIC languages in some form. It's a handy time saver if you use it right.

Guess that VB6 certification was kinda shitty.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

brew

#17
Quote from: MyndFyre[vL] on March 23, 2007, 11:07 PM
I'm relatively certain (though not 100%) that Visual Basic 6 strings are not Unicode.

They are. Try this code...

Private Sub Form_Load()
    MsgBox LenB("asdf")
End Sub


8? that must mean the characters must be two bytes each... Then the extra 6 for defining length and the scope of the string. What I'm trying to say is that vb6 strings are stored in unicode.

EDIT***
oops.... shadow already posted this *hits his head off the wall* i should've read before i posted

Quote from: raylu on March 24, 2007, 01:13 AM
Also, using "" would cause the string literal to be created and destroyed every one of those 50,000 times, wouldn't it?

This is correct, but acually it would be created and destroyed all 50,000 times. I'm unsure why, but it still seems to be faster then vbNullString even though using vbnullstring would indeed be the better choice. Perhaps a newer compiler for higher level languages might add some sort of catche for these type of operatons (of a commonly used string or value) and use that as a local variable instead.... just a guess
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

MyndFyre

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.