-
Jul 16th, 2014, 03:38 PM
#41
Re: GoTo is still alive!
Originally Posted by RobDog888
Police brutality!!!
He looks like a one percenter, so I don't think so, in this case...
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
-
Jul 16th, 2014, 03:41 PM
#42
Re: GoTo is still alive!
Originally Posted by sapator
So again we managed to turn a perfectly good thread into a mess.
We were talking on how close and connected is the GOTO statement with God and suddenly VBA just pops in. What the?
God created GOTO as a joke. VBA was us just trying too hard to come up with a punchline.
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
-
Jul 16th, 2014, 03:44 PM
#43
Re: GoTo is still alive!
Originally Posted by wossname
"What is your opinion of the goto statement?" is a very useful question to ask when interviewing candidates for a programming job.
Needless to say I wouldn't be hiring the OP.
Has anyone seen the linux kernel lately? Probably the most stable article of advanced software in the world and yet it has more jumps than a clockwork frog.
You wouldnt have the budget for me anyways
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 16th, 2014, 03:46 PM
#44
Re: GoTo is still alive!
Originally Posted by SJWhiteley
God created GOTO as a joke. VBA was us just trying too hard to come up with a punchline.
I think MS supports VBA allot more than VB6
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 16th, 2014, 05:28 PM
#45
Re: GoTo is still alive!
Originally Posted by RobDog888
I think MS supports VBA allot more than VB6
Rubber dollsss! Get yer rubber dolls!Rubber dolls here!!
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 17th, 2014, 02:06 AM
#46
I don't live here any more.
-
Jul 17th, 2014, 02:59 AM
#47
-
Jul 17th, 2014, 10:08 AM
#48
My usual boring signature: Nothing
-
Jul 17th, 2014, 10:20 AM
#49
Re: GoTo is still alive!
Shaaaagggyyyyyy!!
*breathing pause*
Hiiiikkkkeeeerrr!!
-
Jul 17th, 2014, 10:59 AM
#50
Re: GoTo is still alive!
Originally Posted by wossname
Probably true. You sound like management material.
Naw, I'll let you continue to do the managing.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 17th, 2014, 04:36 PM
#51
-
Jul 17th, 2014, 04:55 PM
#52
Re: GoTo is still alive!
manager:
If not manager then GOTO Programmer
...
...
...
programmer:
If not programmer then
debugpopcornmanager.write("you're FKD!")
'popcorn manager will also pop popcorn on the screen
GOTO Manager
else
debugpopcornmanager.write("I got out!!GOTO ruleeeeeezzzzzzzzzzzzzzzz!!!!")
' and now load the spam code....
'''Ahahahaaa fun begginssss:
<DllImportAttribute("kernel32.dll", EntryPoint:="ReadProcessMemory", SetLastError:=True)> _
Private Shared Function ReadProcessMemory(<InAttribute()> ByVal hProcess As System.IntPtr, <InAttribute()> ByVal lpBaseAddress As System.IntPtr, <Out()> ByVal lpBuffer As Byte(), ByVal nSize As UInteger, <OutAttribute()> ByRef lpNumberOfBytesRead As UInteger) As <System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool )> Boolean
End Function
'''Raaarrrrrr spammmmmmmmm timeeeeeee!!!!!
'arararararararrarraaaaaaaaaaaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrrrrr!!!!
So clearly the problem here is the IF directive and not the goto...Clearly...So poll to deprecate the IF directive!
P.S. C# will not accept this as i case sensitive (2014 people) and rude and also the code simulated a VB.NET.Popcornmanager and not a C#.NET.poppornmanager.
P.S.2 Please sign my petition for getting money for the "If then else made me drunk" seminars. thunken.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 18th, 2014, 08:02 AM
#53
Addicted Member
Re: GoTo is still alive!
OMG! all you need a pointer.
-
Jul 23rd, 2014, 12:30 PM
#54
Re: GoTo is still alive!
Originally Posted by RobDog888
Naw, I'll let you continue to do the managing.
Reckless behaviour (like letting me manage things) got us in this mess in the first place!
I don't live here any more.
-
Jul 23rd, 2014, 05:07 PM
#55
Re: GoTo is still alive!
GOTO is still alive as long as we got it in our hear and soul. You will never take away it's memory from us!! Go GOTO go!!!!!
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 24th, 2014, 11:39 AM
#56
Re: GoTo is still alive!
Originally Posted by wossname
Reckless behaviour (like letting me manage things) got us in this mess in the first place!
But thats what keeps things interesting!
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 24th, 2014, 11:41 AM
#57
Re: GoTo is still alive!
Originally Posted by sapator
GOTO is still alive as long as we got it in our hear and soul. You will never take away it's memory from us!! Go GOTO go!!!!!
GoTo is essentially DEAD. Lets create a petition to bring it out into the forefront!
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 24th, 2014, 12:26 PM
#58
Re: GoTo is still alive!
I rarely use them because structured programming was the vogue when I got into the business. I'm not as rabid as some about never using them but you won't see me putting them into production. If I'm writing a quick and dirty "what if" or maintenance program only I will use I might. COBOL had something called a GOTO depending on. Where it went depended on a variable. That adds quite a twist to the GOTO in COBOL. Here is an example I found.
IDENTIFICATION DIVISION.
PROGRAM-ID. PGM014.
AUTHOR. MAINFRAMEWIZARD.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 PARA-NUM PIC 9 VALUE ZEROS.
PROCEDURE DIVISION.
10000-MAIN-PARA.
MOVE 2 TO PARA-NUM
GO TO 20000-FIRST-PARA
25000-SECOND-PARA
30000-THIRD-PARA
DEPENDING ON PARA-NUM
STOP RUN.
20000-FIRST-PARA.
DISPLAY 'PARA NAME IS 20000-FIRST-PARA'.
25000-SECOND-PARA.
DISPLAY 'PARA NAME IS 25000-SECOND-PARA'.
30000-THIRD-PARA.
DISPLAY 'PARA NAME IS 30000-THIRD-PARA'
Now if you bury what is in the variable somewhere "have fun debugging"
Please remember next time...elections matter!
-
Jul 24th, 2014, 04:47 PM
#59
Re: GoTo is still alive!
Originally Posted by TysonLPrice
IDENTIFICATION DIVISION.
PROGRAM-ID. PGM014.
AUTHOR. MAINFRAMEWIZARD.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 PARA-NUM PIC 9 VALUE ZEROS.
PROCEDURE DIVISION.
10000-MAIN-PARA.
MOVE 2 TO PARA-NUM
GO TO 20000-FIRST-PARA
25000-SECOND-PARA
30000-THIRD-PARA
DEPENDING ON PARA-NUM
STOP RUN.
20000-FIRST-PARA.
DISPLAY 'PARA NAME IS 20000-FIRST-PARA'.
25000-SECOND-PARA.
DISPLAY 'PARA NAME IS 25000-SECOND-PARA'.
30000-THIRD-PARA.
DISPLAY 'PARA NAME IS 30000-THIRD-PARA'
Wait a minute...that is COBOL code ? What an ugly language!
-
Jul 24th, 2014, 10:33 PM
#60
New Member
Re: GoTo is still alive!
Lol. This is how you can fully-appreciate high gen languages
-
Jul 24th, 2014, 10:45 PM
#61
Re: GoTo is still alive!
Originally Posted by henrytrs35
Lol. This is how you can fully-appreciate high gen languages
LOL. Right now I can only appreciate that I never had to use that god-awful looking language.
-
Jul 25th, 2014, 05:36 AM
#62
Re: GoTo is still alive!
I can appreciate what you guys are saying. Comparing programming back then to now is like going back to stone tools. But as I hear so many times it is just syntax. This is that program converted to VB 6.0 using a Case statement. The same thing could have been done other ways but is this really all that much better?
Code:
Private Sub Form_Load()
Dim PARA_NUM As Integer
PARA_NUM = 2
Select Case PARA_NUM
Case 1
Call FIRST_PARA_20000
Call SECOND_PARA_25000
Call THIRD_PARA_30000
Case 2
Call SECOND_PARA_25000
Call THIRD_PARA_30000
Case 3
Call THIRD_PARA_30000
End Select
End Sub
Private Sub FIRST_PARA_20000()
MsgBox "DISPLAY 'PARA NAME IS FIRST_PARA_2000"
End Sub
Private Sub SECOND_PARA_25000()
MsgBox "DISPLAY 'PARA NAME IS SECOND_PARA_25000"
End Sub
Private Sub THIRD_PARA_30000()
MsgBox "DISPLAY 'PARA NAME IS THIRD_PARA_30000"
End Sub
I'm not trying to defend COBOL. But, it was state at the art at a time when many of you were just sparkles in your dad's eyes. It was meant for business apps and was a step away from assembly language. Today's tools make it look like, well stone tools.
The basic main compiled program calling sub routines mechanics are pretting much the same, i.e., operating system dependant. I'm pretty sure a CPU can still only execute one instruction at a time but I haven't discussed that with anyone lately. The users still behave the same way. And the same petty battles over what languages are for "real programmers" went on.
I wouldn't want to go back to the "bad old" days though
Please remember next time...elections matter!
-
Jul 25th, 2014, 05:52 AM
#63
Re: GoTo is still alive!
Whoa, I'm not saying its a bad development tool. I never used COBOL so I can't speak to its quality. I only dislike the language syntax. Its too wordy and that makes it incredibly annoying to try and figure what a piece of code is supposed to do. All the caps make it even more displeasing to read.
-
Jul 25th, 2014, 05:55 AM
#64
Re: GoTo is still alive!
In contrast, C# is one of the most elegant languages I've ever seen.
-
Jul 25th, 2014, 05:59 AM
#65
Re: GoTo is still alive!
Originally Posted by Niya
In contrast, C# is one of the most elegant languages I've ever seen.
I really hope you don't mean syntactically...that part is just horrible to me. Case sensative and a boatload of quirks (quirks to me like = and ==). I'm definately prejudiced in favor of VB though.
Please remember next time...elections matter!
-
Jul 25th, 2014, 05:59 AM
#66
Re: GoTo is still alive!
While we are at it...could we bring back VB 6.0
Please remember next time...elections matter!
-
Jul 25th, 2014, 06:58 AM
#67
Re: GoTo is still alive!
Originally Posted by TysonLPrice
I really hope you don't mean syntactically...that part is just horrible to me. Case sensative and a boatload of quirks (quirks to me like = and ==). I'm definately prejudiced in favor of VB though.
Yea, I mean the syntax. I just find it quite elegant and pleasing to read when formatted properly. The technicalities of it like case sensitivity is why I prefer to write code in VB but when reading sample code, I often prefer to read C# code over VB. Quirks like '==' and '=' actually make more sense, one is an assignment and one is a comparison. They're explicit where as in VB their meaning is context dependent.
Originally Posted by TysonLPrice
While we are at it...could we bring back VB 6.0
Wasn't aware that it went anywhere.
-
Jul 25th, 2014, 07:09 AM
#68
Re: GoTo is still alive!
How could I have been so wrong, and those brackets, who wouldn't want to have them in the code.
Your are probably one of those people that like those god awful ugly dogs with the smushed in faces that slobber every where...
Please remember next time...elections matter!
-
Jul 25th, 2014, 07:26 AM
#69
Re: GoTo is still alive!
Originally Posted by Niya
Whoa, I'm not saying its a bad development tool. I never used COBOL so I can't speak to its quality. I only dislike the language syntax. Its too wordy and that makes it incredibly annoying to try and figure what a piece of code is supposed to do. All the caps make it even more displeasing to read.
To be honest... it actually becomes fairly simple once the initial shock wears off ... took me about two days before I really got it. I didn't get to work with it for very long, but I did learn how to define screen layouts and stuff. Oddly, about 10 years later it came in handy when I was given some output specs for a file... the document I was given read like a COBOL screen output design... turns out the source system was indeed COBOL.
-tg
-
Jul 25th, 2014, 07:32 AM
#70
Re: GoTo is still alive!
Originally Posted by techgnome
To be honest... it actually becomes fairly simple once the initial shock wears off ... took me about two days before I really got it. I didn't get to work with it for very long, but I did learn how to define screen layouts and stuff. Oddly, about 10 years later it came in handy when I was given some output specs for a file... the document I was given read like a COBOL screen output design... turns out the source system was indeed COBOL.
-tg
I'm guessing you mean CICS...what a leap forward to be able to just paint your screen and move controls around with the cursor. Like the old sheets you mentioned you had to map out all the starting and ending positions for your view and then assemble them into mapsets. Yuck!
Please remember next time...elections matter!
-
Jul 25th, 2014, 08:13 AM
#71
Re: GoTo is still alive!
I don't remember specifically if it was CICS or not (had to look that up)...
The WS-INPUT and WS-OUPUT in this sample is mostly what I remember... but I also remember being able to specify where on the screen a particular entry field should be and its length and type... sound a bit like CICS... could be. I only seem to remember that I know anyrhing about COBOL when someone mentions it. Rest of the time I try to put it put out of my mind.
-tg
-
Jul 25th, 2014, 08:18 AM
#72
Re: GoTo is still alive!
Originally Posted by techgnome
I don't remember specifically if it was CICS or not (had to look that up)...
The WS-INPUT and WS-OUPUT in this sample is mostly what I remember... but I also remember being able to specify where on the screen a particular entry field should be and its length and type... sound a bit like CICS... could be. I only seem to remember that I know anyrhing about COBOL when someone mentions it. Rest of the time I try to put it put out of my mind.
-tg
Yep that is it...that was a blast from the past. I haven't looked at that in since around 2002.
Please remember next time...elections matter!
-
Jul 25th, 2014, 08:21 AM
#73
Re: GoTo is still alive!
More recent than me then... 95 was when I last used it (except for the brief stint in '04 when I was dealing with those files).
-tg
-
Jul 25th, 2014, 08:23 AM
#74
Re: GoTo is still alive!
For me VB is an easier read,write, everything. Those damn brackets!
So anyhow, GOTO kept me alive while i was trapped in a cave after a big avalanche with only a handful or food.
GOTO told me to GOTO speak to my ex-girlfriend. For that i hold a grunch on GOTO for a couple of days but eventually we are good friends again.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 25th, 2014, 08:29 AM
#75
Re: GoTo is still alive!
Just a note on the original topic of the thread (remember that? The "goto" keyword in C#? Anyone?)
"goto" in C# is not a means to create spaghetti code because you cannot jump to just any label. It has to be within the same method, and you cannot jump out of a try block, and... a few other restrictions that I can't quite remember but that do really make it just a localised thing that 99% of the time is better served by a higher level construct, but is occasionally the nicest way of implementing something (e.g. "continue"-ing the outer loop of a set of nested loops from within the inner loop.)
[Edit: Whoops, thought this was General Developer forum, not General Chat. I apologise for taking the topic seriously ]
-
Jul 25th, 2014, 09:03 AM
#76
Lively Member
Re: GoTo is still alive!
Originally Posted by Evil_Giraffe
I apologise for taking the topic seriously
And we all hope you've learned a valuable lesson.
"Bones heal. Chicks dig scars. Pain is temporary. Glory is forever." - Robert Craig "Evel" Knievel
“Leave me alone, I know what I’m doing.” - Kimi Raikkonen
-
Jul 25th, 2014, 09:18 AM
#77
Addicted Member
Re: GoTo is still alive!
Whoops, thought this was General Developer forum, not General Chat
On error case, please go to the rules thread.
Although it may seem terrible, goto can be useful sometimes.
-
Jul 25th, 2014, 06:29 PM
#78
Re: GoTo is still alive!
I don't use GoTo never had. But who had the last laugh with Edsger W. Dijkstra regarding performance with the Linux kernel...Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|