473,654 Members | 3,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GoTo in VBScript?

Although InterDev syntax highlights GoTo as a keyword, it isn't supported in
VBScript. I'm wondering if anyone has a clever workaround for this
limitation? TIA!

Jun 6 '06 #1
4 83477
On Tue, 6 Jun 2006 16:15:04 -0700, "Ron Hinds"
<__ron__dontspa mme@wedontlikes pam_garageiq.co m> wrote:
Although InterDev syntax highlights GoTo as a keyword, it isn't supported in
VBScript. I'm wondering if anyone has a clever workaround for this
limitation?


Work around how? Do you want to emulate a "GoTo"? Or not have it
highlighted?

Jeff
Jun 7 '06 #2
"Ron Hinds" <__ron__dontspa mme@wedontlikes pam_garageiq.co m> wrote in message
news:en******** ******@TK2MSFTN GP02.phx.gbl...
Although InterDev syntax highlights GoTo as a keyword, it isn't supported in VBScript. I'm wondering if anyone has a clever workaround for this
limitation? TIA!


"GoTo" is used within "On Error GoTo 0" which resets "On Error Resume Next".
Jun 7 '06 #3

"Ron Hinds" <__ron__dontspa mme@wedontlikes pam_garageiq.co m> wrote in message
news:en******** ******@TK2MSFTN GP02.phx.gbl...
Although InterDev syntax highlights GoTo as a keyword, it isn't supported
in
VBScript. I'm wondering if anyone has a clever workaround for this
limitation? TIA!


There is no good reason for wanting a goto (except exceptions that need on
error as said before in vbscript) against existing code flow instructions.

You can use
Do [while blah]
Exit Do
Loop [until blah]

Select Case
Case blah
Case Else
End Select

If blah Then
ElseIf blah2 Then
Else
End If

Jun 7 '06 #4
Ron Hinds wrote on 07 jun 2006 in
microsoft.publi c.inetserver.as p.general:
Although InterDev syntax highlights GoTo as a keyword, it isn't
supported in VBScript. I'm wondering if anyone has a clever workaround
for this limitation? TIA!


It is not a limitation.

Goto gives terrible programming:
<http://www.rug.nl/rc/organisatie/pic.../archief/2002-
05/afbeeldingen/fortran.jpg>

Prof. Edsger Wybe Dijkstra said 1968 that the "goto" syntax was the
killer of higher languages, meaning any higher than primitive assembler.

<http://en.wikipedia.or g/wiki/Edsger_Dijkstra >
<http://david.tribble.c om/text/goto.html>
<http://www.cs.utexas.e du/users/EWD/>

Modularity later became the buzzword.

VB/VBS never implemented "goto", and I agree, it was the savior act of
BASIC.

Goto makes a computer language a untestable mess. It prevents the
cascading black boxes that can be separately tested and reused. It
prohibits efficient compiling.

Small remnants of goto, that are usefull can be felt in:

exit function
exit for

efficient because they do not hinder modularity.

=============== =

on error goto 0

is a remnant of

on error goto 200

[all goto-s ponted to line numbers at first,
when line labeling was not invented]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 7 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
9343
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other times it returns VarType() is vbEmpty. This is driving me mad! Also, does anyone know what the properties and methods are for the object returned by GetRef()? TIA.
3
2933
by: William F. Robertson, Jr. | last post by:
My problem is I routinely use both vbscript and javascript (yes, that is a problem in itself) on the same webpage. I feel placing the "javscript:" or "vbscript:" on all my client side events is bloating the size of my page, especially in my menu. I am aware the "default" language of the page is the first defined script, but I can not guarantee javascript will always be defined first. Is there a way to wrap a block of html to have a...
34
26623
by: electrician | last post by:
Perl has it, Basic has it, Fortran has it. What is so difficult about creating a goto command for JavaScript. Just set up a label and say go to it.
3
2181
by: electrician | last post by:
Yes, no GOTO. This is a major blunder on part of the creators of these tools. GOTO gives the programmer the absolute control over the program. Yes, no matter what, a GOTO sends the program to where YOU want and takes the power away from the mean spirited CREATORS. Yes, even GOD gave us free will! But the creators of JavaScript have decided they will forever interfere in how YOU program. THEY have decided to keep GOTO to themselves...
6
12586
by: Julien | last post by:
Hello, I have some files located in a file server and managed by a SQL database from a web based interface using ASP + VBSCRIPT technology. I need to automatically copy those files to a web folder. I that possible? Thanks.
12
7899
by: Jim Rodgers | last post by:
I have a big asp file that has an error under certain conditions -- totally repeatable. However, it only fails when I set response.buffer = True at the top. WHen I set it False in order to debug it, it works every time! I even set it to True, but did a .Flush just before the error, and the error won't happen. It only happens when response.buffer is True and no .response.flush is issued. The error is a string variable turns-up empty...
0
1554
by: raminator | last post by:
Microsoft VBScript runtime error '800a01a8' Object required: 'rs2' /login/login.asp, line 233 ------------------------------------------------------------------------------------- I get the error above when I try to log in. The following code is the code through the process. Step 1:
2
4557
by: tunk | last post by:
I dont know where to start my question so let me tell you my story :) The ASP that cause me trouble is running on IIS that set ASP default language to JScript instead of VBScript. This ASP page is popped up by another ASP page and there are authentication, privilege and security stuff involved. And yes this page contain a lot of javascript. there is a <DIV></DIV> in this page for me. And my job is as simple as put another page between...
3
9432
by: nitewriter | last post by:
Hi, Can someone help me with this scripts, it works on a different server but gives me error now, This is the error I now get Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'OpenConn' /customer/authenticate.asp, line 17
0
8375
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8482
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2714
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.