Android Question Help with unconditional jump

Beja

Expert
Licensed User
Longtime User
Searching the forum, I couldn't find the equivalent of:

a = b
c = d
Goto xyz

Any help appreciated.
 

Beja

Expert
Licensed User
Longtime User
No Steve,
and yes there is no goto.. but looking for the equivalent.. there must be away to branch out from a
line to a remote line in the same sub and without conditions.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Just a thought, Select / Case / End Select may suit you better, depending on what you are trying to achieve. It's still conditional through.
 
Upvote 0

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Something like this... Its an old DBase trick.

B4X:
Do While True
    Dim a,b,d As Int
    If a=a Then
    End If
   
    If b=b Then
        Exit '--- exit the do loop from here
    End If

    If d=d Then
    End If


    Exit '--- we where always going to exit the loop
Loop
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
In assembler or machine code, we call this indirect addressing, where the address of the
final destination is stored somewhere pointed to by a variable stored in yet AnotherSomewhere.
A sensor or other interrupt routine changes AnotherSomewhere and everything then starts from there in domino effect.
So there is no condition for the last jump.
 
Upvote 0
Top