Subject Re: password.cc
From Mervyn Bick <invalid@invalid.invald>
Date Sat, 3 Nov 2018 09:10:13 +0200
Newsgroups dbase.getting-started

On 2018-11-02 11:03 PM, Charlie wrote:
> Hi Mervyn... That works great.  Thanks so much!
>
> The only thing is I found it doesn't work unless you put a return before endif.  Now it works great!!!
>

Mm, the two forms I posted were working here but then the definition of
test data is "The only data the program will actually work with." :-)

Endif is used in many places in the code so I have no idea of where
you've placed this additional return.

Back in the days when I was learning to program (a LONG time ago :-) )
the buzz word was "structured programming".  One of the "rules" was that
a sub-routine only had one entry point and one exit point.  In other
words there should only be one RETURN at the end of a function's code.
On the other hand, if it works it's not wrong. :-)

In your next post in this thread you mention that now your program
sometimes misbehaves and goes into a loop.  This could be the direct
result of your additional return which is now, on occasion, bypassing
code that needs to be executed.  You should go through this code very
carefully.  Ken's suggestion of placing temporary print statements at
strategic points of the code will enable you to see what your code is doing.

Mervyn.