473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 83356
On Tue, 6 Jun 2006 16:15:04 -0700, "Ron Hinds"
<__ron__dontspamme@wedontlikespam_garageiq.com> 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__dontspamme@wedontlikespam_garageiq.com> wrote in message
news:en**************@TK2MSFTNGP02.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__dontspamme@wedontlikespam_garageiq.com> wrote in message
news:en**************@TK2MSFTNGP02.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.public.inetserver.asp.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.org/wiki/Edsger_Dijkstra>
<http://david.tribble.com/text/goto.html>
<http://www.cs.utexas.edu/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
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...
3
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...
34
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
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...
6
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...
12
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...
0
by: raminator | last post by:
Microsoft VBScript runtime error '800a01a8' Object required: 'rs2' /login/login.asp, line 233 ------------------------------------------------------------------------------------- I get the...
2
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.