Simple - But Lost


RJE

Recommended Posts

This is so simple that it is frustrating and I can't get it to work. Been at it most of the day.

I have a sequence that I call as a function. This sequence, when done has 4 numbers that I want to return.

The sequence calcs NumA, B, C & D which I would like to return all 4 numbers to the calling sequence and then deal with each number.

I can change the return() for each number and all works well but pulling all 4 numbers back is a lost cause, so far.

Help!

Link to comment
Share on other sites

Yes, that works just fine. At least I was on the right track trying to figure it out.

In your example you declare ret as private, I would have thought it should be global (as I did).

Thanks

Link to comment
Share on other sites

If it was global, you wouldn't need to return() it. It'd be available from anywhere and would also clutter the global namespace. All languages work this way. You should almost always be returning a private. In fact, you should make as many variables as you can private.

Link to comment
Share on other sites

I understand, makes good sense.

Would be nice to spend alot of time immersed in DF to learn all its secrets that would only be gained from experience.

Even though I'm just using it in a hobby sort of way I keep learning, which is important. So when we land a nice project at work that needs a package like this, I'll be ready.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.