Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
vbNullString
#1
Can't let LGM give all the Knowledge ><

vbNullString > ""
Reply
#2
How much faster is vbNullString? Is there any way to test it?
Reply
#3
><

Well, there was no way I was going to read everything you copied and pasted from another site.

I think you should have just posted a link to the site you got it from -_-;;
Reply
#4
I wouldn't really worry too much about these kinds of optimizations unless you are very, very desperate for speed (or the routine is being used a few hundred times per second). When saying "" < vbNullString, we're basically saying 0.001ms < 0.0008ms. Point being, slightly slower then fast is still fast. :wink:
Reply
#5
Spodi Wrote:I wouldn't really worry too much about these kinds of optimizations unless you are very, very desperate for speed (or the routine is being used a few hundred times per second). When saying "" < vbNullString, we're basically saying 0.001ms < 0.0008ms. Point being, slightly slower then fast is still fast. :wink:

I am not saying you should just go through your source and replace all '""' with vbNullString (but you can in the right circumstances), but that you should get into the habit of writing it instead of "".

Good habits are very valuable in programming
Reply
#6
Quote:Good habits are very valuable in programming

Very true.
Reply
#7
You could just hit replace all, if you wanted to, but like Spodi says, it really doesn't make all that much of a difference.
Reply
#8
Johnman Wrote:You could just hit replace all, if you wanted to, but like Spodi says, it really doesn't make all that much of a difference.

Some instances of '""' are needed.
Reply
#9
Kite Wrote:
Johnman Wrote:You could just hit replace all, if you wanted to, but like Spodi says, it really doesn't make all that much of a difference.
Some instances of '""' are needed.
Actually no. It's only used for the Quote = """" And I dont even think that constant is used.
Reply
#10
William Wrote:
Kite Wrote:
Johnman Wrote:You could just hit replace all, if you wanted to, but like Spodi says, it really doesn't make all that much of a difference.
Some instances of '""' are needed.
Actually no. It's only used for the Quote = """" And I dont even think that constant is used.

Actually no. I believe some instances of "" are needed, I don't remember which ones, but there was a discussion about this earlier where this came up.

Tongue
Reply
#11
Oh yeah, guess it can be bad to use vbNullString when you save data with PutVar. Not sure thought, for example:

Call PutVar(FileName, "NPC" & NpcNum, "Name", vbNullString)

Still it should work.. so I dont know. Tongue
Reply
#12
Well, I never changed it on Vanilla Mirage, but on my source I remember having several instances of '""' which needed to be kept.

Otherwise the thing just didn't work >
Reply
#13
I think i changed all in my source, and that seems to work just fine Tongue
Reply
#14
vbNullString is just that, a null string, "" is an empty string, fairly different...
vbNullString doesn't really take any more space, "" does.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)