09-13-2021, 08:16 PM
(This post was last modified: 09-13-2021, 08:18 PM by RandomiserUsr.)
(09-13-2021, 10:15 AM)maeloterkim Wrote:(09-12-2021, 09:10 PM)RandomiserUsr Wrote:(09-10-2021, 06:17 PM)maeloterkim Wrote: Hi if i compile this, says
warning: [W180] Unreachable code
but i don't know why
the version is zxbasic-1.15.2
Code:' EXAMPE UNRECHABLE CODE
declare sub mySub()
Dim myNumber As uByte
cls
myBucle:
for myNumber = 0 to 7
mySub()
next myNumber
goto myBucle
sub mySub()
end sub
Looks like there is escape from the loop?
and an empty mySub() ?
Thanks
if i fill the sub like this
sub mySub()
dim a as ubyte
dim b as ubyte
a = 1
b = 1
a = a + b
end sub
the problem is the same I writed an empty sub only as a example I found the problem in first time with not empty sub
and where is the escape from the loop? i don't see it
is a very very little structure. Just one goto, one for and one sub
Hi, sorry I missed off some of the message.
I can't see how this myBuckle loop would exit?
myBucle:
for myNumber = 0 to 7
mySub()
next myNumber
goto myBucle
Lastly what is the full code listing and full error you are getting?