I am having difficulty understanding the goto semantics. Note the following for-loop:
for i = SIG_ALERT, SIG_NONE_PENDING do
if i % SIG_SLEEP == 0 or i % SIG_WAKEUP == 0 then
goto continue
end
local signalName = thread:getSignalName( i )
thread:sendSignal( test_h, i, signalName )
utils:postMsg( sprintf("Sent %s to test thread.\n", signalName ) )
::continue::
end
I trying to skip the SIG_SLEEP and SIG_WAKEUP iterations and my reading of the Lua manual suggests this should work. Alas it does not. When executed the for-loop generates the error, âUnexpected âgotoâ near 'endâ.
Any help would be very much appreciated.