30.12.2019, 11:07
Here is another (simpler) example that is not working.
The code below does not print the "AAAAAAAAAAAAAAA" (the first line statement).
If I comment out the log statement in the inner for-loop, everything works fine.
CODE:
-----------------------------------------------------------------
log('AAAAAAAAAAAAAAAAAA')
local pid = os.getpid()
spid = ' (pid=' .. pid .. ')'
log('STARTING SCRIPT ' .. _SCRIPTNAME .. spid)
log('BBBBBBBBBBBBBBBBBBB')
for i=1,2,1 do
log( 'CCCCCCCCCCCCCCCCCC')
for j=1,3,1 do
log('DDDDDDDDDDDDDDDD')
end
end
OUTPUT:
-----------------------------------------------------------------
ZZTest 30.12.2019 12:04:03
* string: STARTING SCRIPT ZZTest (pid=5393)
ZZTest 30.12.2019 12:04:03
* string: BBBBBBBBBBBBBBBBBBB
ZZTest 30.12.2019 12:04:03
* string: CCCCCCCCCCCCCCCCCC
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: CCCCCCCCCCCCCCCCCC
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
The code below does not print the "AAAAAAAAAAAAAAA" (the first line statement).
If I comment out the log statement in the inner for-loop, everything works fine.
CODE:
-----------------------------------------------------------------
log('AAAAAAAAAAAAAAAAAA')
local pid = os.getpid()
spid = ' (pid=' .. pid .. ')'
log('STARTING SCRIPT ' .. _SCRIPTNAME .. spid)
log('BBBBBBBBBBBBBBBBBBB')
for i=1,2,1 do
log( 'CCCCCCCCCCCCCCCCCC')
for j=1,3,1 do
log('DDDDDDDDDDDDDDDD')
end
end
OUTPUT:
-----------------------------------------------------------------
ZZTest 30.12.2019 12:04:03
* string: STARTING SCRIPT ZZTest (pid=5393)
ZZTest 30.12.2019 12:04:03
* string: BBBBBBBBBBBBBBBBBBB
ZZTest 30.12.2019 12:04:03
* string: CCCCCCCCCCCCCCCCCC
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: CCCCCCCCCCCCCCCCCC
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD
ZZTest 30.12.2019 12:04:03
* string: DDDDDDDDDDDDDDDD