-
February 4th, 2018, 08:26 AM
#1
[RESOLVED] On x GoTo s1, s2, s3, s4
Hello.
I´m trying to translate a code to Java but it´s a long time ago that I worked with Basic.
In this (simplified) code, I have something like
Code:
Private Sub Form_Load()
x = 5
Debug.Print "---------------"
On x GoTo s1, s2, s3, s4
s1:
Debug.Print 11
s2:
Debug.Print 22
s3:
Debug.Print 33
s4:
Debug.Print 44
s5:
Debug.Print 55
End Sub
When I write x = 0, it will print in the immediate window
11 22 33 44 55
When I write x = 1, 11 22 33 44 55
When I write x = 2, 22 33 44 55
When I write x = 3, 33 44 55
When I write x = 4, 44 55
When I write x = 5, 11 22 33 44 55
When I reverse the order of the labels in the on GoTo line everything changes.
What are the rules here? I can´t find anything in the reference.
Thanks in advance,
Emmanuel
-
February 4th, 2018, 11:03 AM
#2
Re: On x GoTo s1, s2, s3, s4
-
February 4th, 2018, 12:31 PM
#3
Re: On x GoTo s1, s2, s3, s4
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
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
|