Re: Call to c_func() short-circuited
- Posted by petelomax Dec 17, 2018
- 1659 views
alrobnett said...
Error message says bad routine number (-1)
As others have said, we need to see the definition of Read_File_id
alrobnett said...
Warning: .... call to c_func() might be short-circuited.
As an (84 year-old) electrical engineer, I know quite well what the word "short-circuited" means, but I have no idea what it means in this context.
It just means the call might not take place. Personally I think it is a useless distraction, and phix does not issue such warnings. You will get that message if you have say
if Read_File_id!=-1 and c_func(Read_File_id,{...})!=0 then
(assuming !=0 means success) which I would suggest avoiding by do this instead:
if Read_File_id!=-1 then if c_func(Read_File_id,{...})!=0 then
The warning was introduced in version 2.1, when the behaviour of "and" and "or" changed, over 15 years ago, and I don't think anyone needs it any more.
Pete