VBScript functions versus VB functions

  • Thread starter Herfried K. Wagner [MVP]
  • Start date
H

Herfried K. Wagner [MVP]

Hello,

Mr. x said:
I need a good help/tutorial for VB, please (I preffer *.chm
help file).

Also :
for the function : now() in VBScript for getting the current time,
what is the counterpart function of VB ?

Most functions are similar in VBScript, VB Classic and VB.NET. Are you
referring to VB.NET or VB Classic?
 
M

Mr. x

Hello,
I need a good help/tutorial for VB, please (I preffer *.chm help file).

Also :
for the function : now() in VBScript for getting the current time,
what is the counterpart function of VB ?

Thanks :)
 
M

Mr. x

Hello,
I am using the ASPX and put code in vb in ASPX, and also in *.ASMX
(Web-Services),
So I think I am looking for VB.NET help.

Thanks :)
 
S

Scott M.

Actually, many VBScript & VB 6.0 functions now have methods to accomplish
the same task the function used to accomplish. While many VBScript & VB 6.0
functions can still be used, they are just, in turn, calling the new .NET
method [i.e. msgbox() calls messageBox.show()].

So, while you can get away with using the "good old" functions in .NET, you
may find that you app performs better if you don't.

By the way, the .NET approach to getting the current time would be to
delcare a new DateTime object and call its appropriate method like this:

Dim y As New Date()
response.write(y.Now())
 
H

Herfried K. Wagner [MVP]

Hello,

Scott M. said:
So, while you can get away with using the "good old"
functions in .NET, you may find that you app performs
better if you don't.

Sorry, but the performance of the 'MsgBox' function has never been a problem
for me.
 
M

Mr. x

Thanks :)
I don't need basic principals of writing vb.net,
but more I need list of functions of all vb.net + some basic syntax.
That's what is really help is (not via the internet), so that's why I have
said I preffered *.chm.
If you can link me to detailed help, such as *.chm file, I would be glade to
know, please.

Thanks :)
 
S

Scott M.

It's just an example of one of many new methods that replace VBScript and &
VB 6.0 Functions. You may not notice any performance issues if you continue
to use the old functions, but for someone who is new to .NET why bother
learning the "old" (non OO) way?

Lastly, while the use of these older functions may not bring your app to its
knees. They are NOT as efficient, by and large, as the new method calls.
 
S

Scott M.

As stated in my other post, I think you are barking up the wrong tree.
VB.NET is a true OO language now and as such, most of the old "functions"
have been replaced with methods. The functions that are still there are
only there as a "crutch" for migrating VB 6.0 developers, but they do not
reflect the best practices of writing code it .NET.

You might be better of beginning to examine the .NET Framework Base Class
Libraries.
 
H

Herfried K. Wagner [MVP]

Hello,

Scott M. said:
but for someone who is new to .NET why bother
learning the "old" (non OO) way?

Old <> Bad
Not OOP said:
Lastly, while the use of these older functions may not bring
your app to its knees. They are NOT as efficient, by and
large, as the new method calls.

Nevertheless, sometimes readability is much higher when using the "old"
functions.
 
C

Cor

Scott,
Do you mean in a same way as that old paper tape things like case sensitive
"crutch" from the paper tape C Unix computer time will been replaced by
modern methods where the power of a computer can be helpful for the
programmer in C# in a way like in VB.net now?
Cor
 
C

Cor

Scott,

Your mails give me the idea that you are thinking that a modern computer is
the same as an abacus. Sorry for you it is not. Even for me it is not a big
problem to make from a function used in VB the same pseudo code as from a
method.

Maybe you underestimate the programmers from Microsoft, I don't. So I don't
think that they did not do that, it's so much easier for the framework you
know?

Regards,

Cor
 
C

Cor

Mr. x,
Sorry but in this newsgroup that is not the topic, maybe just a few persons
who often visits this newsgroup know maybe what you ask, so the change is
little that you get an answer.

The newsgroups for that are the script groups and the asp.net newsgroup.

Sorry,
I cannot help you any furter.
Cor
 
H

Herfried K. Wagner [MVP]

Hello,

Cor said:
Your mails give me the idea that you are thinking that a
modern computer is the same as an abacus.
LOL

Sorry for you it is not. Even for me it is not a big problem to
make from a function used in VB the same pseudo code as from a
method.
ACK

Maybe you underestimate the programmers from Microsoft,
I don't. So I don't think that they did not do that, it's so much
easier for the framework you know?

What did the Microsofties do? I don't really understand the meaning of the
sentence above...

;-)
 
H

Herfried K. Wagner [MVP]

Hello,

Cor said:
Sorry but in this newsgroup that is not the topic, maybe
just a few persons who often visits this newsgroup know maybe what
you ask, so the change is little that you get an answer.

The newsgroups for that are the script groups and the
asp.net newsgroup.

Why are people who don't use an IDE for developing not welcome in this
group?! Notice that I fully agree with redirecting of ASP.NET related
questions to the ASP.NET group.

;-)
 
H

Herfried K. Wagner [MVP]

Hello,

Scott M. said:
VB.NET is a true OO language now

No. VB.NET is _not_ an OO language. VB.NET _supports_ OOP as a _tool_.
You can still write applications in VB.NET without using OOP (module, 'Sub
Main', ...). C# _is_ a programming language limited to OOP only.
and as such, most of the old "functions" have been replaced with
methods.

No. The old functions _are_ methods. 'Right', for example, is a method of
the 'Strings' class.
The functions that are still there are only there as a "crutch" for migrating
VB 6.0 developers,

No. They are main part of the Visual Basic .NET programming language. If
you don't use them, you may want to turn to C#. I don't know any C#
programmer who won't use certain features of his language only because they
don't fit in a certain programming paradigm.
but they do not reflect the best practices of writing code
it .NET.

VB.NET is a programming language for developing VB.NET solutions.
You might be better of beginning to examine the .NET
Framework Base Class Libraries.

The Framework is good, but VB.NET provides _more_.
 
H

Herfried K. Wagner [MVP]

Hello,

Cor said:
Do you mean in a same way as that old paper tape things like
case sensitive "crutch" from the paper tape C Unix computer
time will been replaced by modern methods where the power
of a computer can be helpful for the programmer in C# in
a way like in VB.net now?

;-)
 
S

Scott M.

Cor said:
Scott,

Your mails give me the idea that you are thinking that a modern computer is
the same as an abacus. Sorry for you it is not. Even for me it is not a big
problem to make from a function used in VB the same pseudo code as from a
method.

I don't know what this means.
Maybe you underestimate the programmers from Microsoft, I don't. So I don't
think that they did not do that, it's so much easier for the framework you
know?

I don't know what that means either.
 
S

Scott M.

Herfried K. Wagner said:
Hello,



Old <> Bad

Old = Legacy = Non-consitent with current techniques
Not OOP <> Bad

Not OOP = Not OOP [.NET is ALL about OOP & the changes to VB.NET reflect
that]

Nevertheless, sometimes readability is much higher when using the "old"
functions.

Perhaps, but if you understand OOP, is it that hard to understand that
"length" is an appropriate property for a string rather than an ambiuous
function "len()" that allows a programmer to pass in anything they want
(including expressions that don't have length)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top